Websydian v6.1 online documentationOnline documentation - WebsydianExpress v3.0

FAQ - "Unable to open Document Template..."

Sometimes a business process can return a page that contains the error message [Unable to open Document Template in function "..\html\MyTemplate.HTM" in function "MyFunction"].

See below for reasons to this error and how to resolve it.

Reason

This error comes in three different variations:

  1. The folder and template name are as expected.
  2. The referenced folder is not correct - it specifies the root folder of the site instead.
  3. The folder is correct - but a file with an unexpected suffix is referenced (e.g. MyErrorPage_XXX).
1. The folder and template name are as expected.

This will almost always be because the template has not been generated - or has not been moved to the correct folder.

2. The referenced folder is not correct

This can typically happen if the PageGenerator does not inherit from PageGeneratorForProcess or if the PageGenerator also inherits from a WSYBASE/WSYUTIL pattern.

The reason is that the option "WSYD Read external path", which is set to "No" for the PageGeneratorForProcess, has been overwritten by "Yes" from another pattern.

3. Correct folder - file with unexpected suffix

This will typically occur if a suffix have been defined for the current presentation - but not all templates used by the process have been copied.

This will typically occur for templates used by either error pages or dynamically loaded drop down generators.

Action

1. The folder and template name are as expected.

Generate the template if it has not already been.

Copy the template to the correct folder.

2. The referenced folder is not correct

Ensure that the PageGenerator does inherit from PageGeneratorForProcess.

Set the option "WSYD Read external path" to "No" for the PageGenerator.

3. Correct folder - file with unexpected suffix

Copy the file to a file with the specified filename.