2. Gotchas

2.1. Filename paths with funny characters

The p-file and p-dir links will report an error if a filename path includes a funny character. The permitted characters are a slash, the letters, the digits, a dot, a hyphen and an underscore. (Note: the space character is not a permitted character.)

2.2. Situation where your preview copy needs to be updated

If you use the publish button on a file that is not yet in the publish site, the publishbutton facility will also alter the copy of the file on the preview site (to set a Subversion property). Unfortunately, this means that your copy of the preview site is now out-of-date, and you will have to use the update option of your Subversion client to get it in step. This is reported on the screen you get back when you use the publish button.

2.3. No subdirectories are published

The p-dir link only publishes files of the current directory: it does not publish any subdirectories of the current directory. This is deliberate in order to keep things simple. If you have subdirectories to publish, visit each of the subdirectories and publish each one in turn.

2.4. Requests to publish deeply nested new subdirectories are rejected

Suppose you are using the p-dir link to publish a directory. Suppose that directory is new and so it does not yet exist on the publish site. Before publishing the files of the new directory, the script will create the new directory on the publish site provided that its parent directory exists on the publish site. However, the script will reject requests to create more deeply nested new subdirectories.

2.5. Unwanted directories on the publish site are ignored

Although the p-dir link can be used to delete unwanted files from the publish site, it will not delete from the publish site any directories that are no longer in the preview site.

2.6. Concurrent uses may lead to undesired effects

Undesired effects may occur if two people are working on the same file. If person X has committed a change to a file on the preview site and person Y then commits some changes and person X then clicks the p-file button, X is then committing some changes to the publish site he/she did not make. Although one could add code to check that the publisher (X) has the same username as the person who last made a change to the file (Y), it will be more difficult to add this checking when a person is publishing a directory.

2.7. Directories that have no TEI XML file get a p-dir link

Suppose a directory on the preview site does not have a TEI XML file. So it does not have an index.xml file. When your browser visits that directory, you will get a nicely-formatted directory listing. That directory listing will include a p-dir link that can be used to publish files in that directory.

2.8. Publishing a file that is not a TEI XML file

There are two possibilities if you wish to publish to the publish site a file that is not a TEI XML file:

  • you can publish an individual file, e.g. https://www.oucs.ox.ac.uk:4443/oucsweb/images/feed-icon.png, by using a URL like:
  • you can instead use the p-dir link to publish files of the directory containing the file.

Up: Contents Previous: 1. Basics Next: 3. Improvements