Managing links

Netscape Web Publisher maintains links between files, updating links automatically as you copy, move, and rename files and directories. The Web Publisher link management function can automatically check and update local links in HTML documents.

The Web Publisher link management function considers these types of links:

Note

If your server administrator turns link management off for your server, you have no access to the link checking function or to the link status database. Please check with your server administrator if link management is turned off. Note that if link management is turned on again, the link status database is empty, and you will have to recheck all files for their current link status.

Link management actions

Web Publisher link management provides internal link-checking mechanisms that take place in the background as part of many Web Publisher operations. This section describes what happens behind the scenes.

When an edited file is published

When an edited document is published:

When a file is uploaded to the server

When a local document is uploaded to the server:

When a file is copied

When you copy a document or folder:

In a copy, the original file still exists, so links pointing into or out of the original file are not affected. Outgoing links to other documents on the same server are checked and fixed by automatic link updating as needed to keep them pointing to the right file.

For example, if you copy fileA from oldFolder to newFolder, and fileA has a relative link to fileB in the same directory, the new fileA will have a link that points back to fileB in oldFolder rather than try to find a fileB within the same newFolder directory. That is, a relative link (../fileB) to another file is expanded to include its directory (../oldFolder/fileB).

Link management copy actions

Operation

File or
folder?

Incoming or
outgoing?

Result

Copy

Either

Incoming

No change, links still point to original file.

Copy

File

Outgoing

Links in newly copied file are mapped to point to original file targets.

Copy Folder

Outgoing within same directory

No change to relative links in newly copied file. Absolute links are mapped to point to files with same names within copied directory.

Note: If a file with the name file2 exists in the new directory, file1 keeps its original relative link and does not map back to the old file2.

Copy

Folder

Outgoing to different directory

Links in newly copied file are mapped to point to original files in old directory.

When a file is moved or renamed

When you move or rename a document or folder:

In a move, the original file no longer exists, so links pointing into or out of the original file must be changed to reflect the file's new location. Links coming in from and going out to other server documents on the same server are checked and fixed by automatic link updating as needed to keep them pointing to the right file.

For example, if you move fileA from oldFolder to newFolder, and fileA has a link to fileB in the same directory, the new fileA will have a link that points back to fileB in oldFolder rather than try to find a fileB within the same newFolder directory. That is, a relative link (../fileB) to another file is expanded to include its directory (../oldFolder/fileB).

Link management move or rename actions

Operation

File or
folder?

Incoming or
outgoing?

Result

Move, rename

Either

Incoming

Links in existing server files are mapped to point to new file location or new file name.

Move, rename

File

Outgoing

Links in moved or renamed file are mapped to point to original file targets.

Move, rename

Folder

Outgoing within same directory

No change to relative links in newly moved file. Absolute links are mapped to point to files with same names within moved directory.

Note: If a file with the name file2 exists in the new directory, file1 keeps its original relative link and does not map back to the old file2.

Move, rename

Folder

Outgoing to different directory

Links in moved or renamed file are mapped to point to original files in old directory.

When a file is being edited

Links to a file in the edit state are operational because you can view edited files in the browser.

Links out of an edited file become invalid when the target file has been moved or renamed during the edit. To fix this, you must go in manually and change the document yourself.

When a file is locked

Locks are ignored. Web Publisher can update a file's links even while it is locked.

When a file is deleted

All incoming links become invalid.

Automatic link updating

When you upload or publish a document, Web Publisher's link management function checks its links automatically. When you copy, move, or rename files in Web Publisher, their links are updated so that they still point to the same documents. This is done by automatically updating the name mapping between the old and new directories.

By changing a link in a file, this function also changes the file's latest modification date. In situations where users need to keep close track of any file modifications, a server administrator can turn off this option. (This is the default.)

When this option is turned off, the links in a file are not kept up to date as other files or folders are moved or renamed. If the option is turned on again, Web Publisher does not return to do any clean-up on files whose links were broken during the time the option was turned off.

The mapping rules are different for move and copy operations. The link updating happens the same way for both operations, but the scope of which documents are affected is quite different.

For a copy, only the copied document needs to be updated if it has any invalid outgoing links. For a move, any and all server documents with links that point at the moved document need to be updated in addition to the moved document, if it has any invalid outgoing links.

Getting link status information

You can get the current status of the links in a file or in all the files within a directory. Web Publisher tries to keep links up to date, name mapping as needed to point to renamed and moved files and folders.

Checking links

You can check the status of all the links in a file's or all the links in all the files within a folder.

There are two ways to check links:

  1. Select the file or folder in the Web Publisher window.
  2. From the Services menu, choose Check Links. A new browser window appears with the file's link status information displayed
    or,
  3. from the Web Publisher Services page, choose Check Links. The link status information is displayed in the right frame.

  4. If you are checking the links in a folder, you can check the "Include subfolders" option to include its subfolders and their files.

When Web Publisher finishes checking all the links in the file, the Link Status form shows a list of all the outgoing links that are working, broken, or external.

When Web Publisher finishes checking the links in a folder, the Link Status page lists all the files within the folder that have outgoing links that are all working or that have one or more broken links. The link status of the subfolders is nto displayed.

Viewing link status information

The link status information for a file whose links have been verified at least once consists of a list of the file's links with icons indicating the status of each link:

Working: The link has been checked and has been found to be a valid, operational link to an existing file on the same server. You also see this status for files in a folder that do not contain any outgoing links.

Broken: The link has been checked and has been found to be a link that targets a file that doesn't exist on the server with the name and path indicated by the link. The link may be a new incorrect link or it may be a link that once worked and that now, for whatever reason, no longer works.

External (For files only): The link has been found to be targeting a destination that cannot be checked. For example, mailto and ftp locations and files or folders of external servers cannot be checked by Web Publisher.

Unchecked (For folders only): The links in this file within the folder have not yet been checked.

Checking a file's links

To check the outgoing links in a file, do the following:

  1. Select a file and view its properties in the Web Publisher Services menu.
  2. Click the Check Links button.

An updated link status list for the file's outgoing links is displayed.

Checking a folder's links

To check the links for a folder, do the following:

  1. Select a folder and view its properties in the Web Publisher Services menu.
  2. Click the Check Links button.
  3. You can include the subfolders in the link checking. The default is to not check the links in the subfolders.

The link status for all the files in the folder is updated and the files are listed, with a notation indicating whether there is any broken or external outgoing link in the file. If there is a single broken link, the broken link icon (X) is displayed.

Note

When link management is turned off for your server and then turned back on again, the link status database is empty. You can recreate a complete link status database by checking the links for your document root with the "Include Subfolders" option selected.

Finding broken links

To find out if there are any Web Publisher documents with broken links in a particular folder, do the following:

  1. Select a folder in the Web Publisher window.
  2. To make sure your link status database is up to date, begin by using the Check Links function for the folder (with Include Subfolders selected).
  3. From the Services menu, choose Find Broken Links.

Web Publisher looks in the link status database to identify any file that contains one or more broken outgoing links and displays a list of these files, as shown in ff.

Finding broken links

For each file in the list, Web Publisher provides