Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Troubleshooting Document Templates

The following table lists common issues you may encounter when creating document templates and how to resolve these issues:

Issue

Resolution

Error when viewing XML file in Internet Explorer:

Only one top level element is allowed in an XML document.

Make sure that the tc:document tag at the top is not closed and that at the very end of the document it includes the closing tc:document tag.

Error when viewing XML file in Internet Explorer:

A string literal was expected, but no opening quote character was found.

Search and replace the following string with double quotes in your XML file.

Replace

\'94

with "

Error when viewing XML file in Internet Explorer:

Reference to undeclared namespace prefix: 'tc'. Error processing resource.

You have not provided the tc:document tags and tc:header tags that are necessary for the template.

The web browser displays an error saying that the opening tag does not match the close tag.

For example, tc:content does not match the opening tag tc:data. I've looked at my code and everything seems to be correct.

If you created your original document in Microsoft Word, it might be because the first tag on the very first line of your document was stored in the Title.

  1. Open Microsoft Word and select File > Properties.
  2. Check the Title field found in the Summary tab. If the Title field includes a tag, remove it.
  3. Convert the RTF file to XML and try again.
  4. If the title is not the problem, verify again that you have closed all of your tags in the correct sequence of nesting.

When generating the document I get an error message similar to:

[*Error in Contact*]

When converting your document to XML, there may have been some issues that caused extra white space in the file. Review your XML file and make sure the Document Generator tags do not have any spaces or carriage returns inside them.

Example #1: <tc:data select="Contact">

Example #2: <tc:data select="Contact">

To resolve this issue find <tc and check for any spaces or carriage returns inside the tag. Remove the spaces that were added while converting to XML so that it is on one line.

When generating the document I get an error message similar to:

[*Error in DetailField: CONT_EMPL/ HireDate*]

[*Error in numberString*]

  • Make sure that the tree position is correct. The tree position must include the entire path (for example, Parent_Child).
  • Make sure that the field name is correct.
  • For system fields, make sure the first letter of the attribute name is uppercase.

When generating the document I get an error message similar to:

No data provided for letter content.

There is probably a typographical error in your tc:document tag. Make sure the entire tag is typed correctly. For example, make sure that the xmlns attribute value is correct.

This message also appears when there are errors in other tags. Make sure that all of your tags are typed correctly.

When I opened the generated document, tags were replaced by empty data and there were no errors, although there is data that should have been included. What is causing the problem?

  • Make sure that the field corresponding to the tag has a value in the record. When a field has null value, the Document Generator will replace the tag with nothing.
  • Make sure that you (or the user generating the document) have rights to the objects, categories, and other data that you are retrieving in the template. Any data to which you do not have rights will not appear in the generated document.
  • Make sure that the tag and its attributes do not contain any extra characters (for example, {}).

    Example:
    <tc:detail select="CLAM/} {ClaimEstimate}{" />
  • Read the Issues in this table regarding errors when generating documents. If the setting is turned off to include errors in the generated document, then it may appear that data is not being retrieved when there is an error in a tag.
  • Your RTF file may be corrupted. To test it, create a new template only containing document generator tags (no text) and attempt to generate the new letter. If this template works, your old RTF file is corrupted and it should be replaced.

I uploaded the template, but when I try to test it by clicking on the Document Generator button, the template is not there.

  • The template will not display unless it is well- formed. Make sure to open your template in a web browser before uploading it.
  • Make sure you are in an object record where that template is available when trying to test your template.
  • Make sure that you uploaded the template to the correct folder in the Documents area:
    • The template must be in the Document Templates folder for the correct Object Definition.
    • The template must not be in a subfolder of the Document Templates folder. Only supporting XML files for a template may be in a subfolder.

When I test my document template using Document Generator, the data from custom fields is not being inserted into the document.

  • Make sure that you are testing using records where the data has been populated.
  • Make sure that you have included both the category tree position and the custom field name in the attribute value of the tag.
  • Make sure the category tree position represents the entire path to the category (for example, Parent_Child_Grandchild).

How do you find the tree position for custom and system lookup tables? For example tree position for address.

Each table found in the Lookup Tables screen has its own unique code.

  • For custom lookup tables, the unique code is defined specifically for your implementation of TeamConnect. It is located next to the name of the custom lookup table.
  • For system lookup tables, the unique code is defined by Mitratech.

When I open the generated document, the RTF source code appears instead of the actual document content.

This occurs when there is a line return or space after the opening tc:content tag. Make sure to include the RTF source code immediately after the opening tc:content tag.

When I test my document template using Document Generator, I get a format error similar to:

[*Error in format: MMMMM-dd-YY*]

There is an error in the format that you have provided for a date field. For example, in this error, the Y's for the year are capitalized. Remember that the dateFormat tag attribute for date fields is case-sensitive.

When I test my document template using Document Generator, there is a huge chunk of code directly in the generated document where I used a tag to retrieve data.

You may have a tc:data tag that is trying to retrieve a data item of the data type "object." An object is not a valid type of data to retrieve in a document template. You may need to continue to navigate, for example, to the name attribute of the object.

In Object Model: Read This First or in the reference tables it points to, locate the object attribute and find its data type in the Data Type column. If it is of type "object," then you cannot retrieve it using a tc:data tag. Refer to the object table to which that object attribute links to find the data that you need to retrieve in the document template.

When I test my document template using Document Generator, I get an error similar to one of the following:

[*Error in numberString*]

[*Error in parent*]

[*Error in name*]

Notice that all of these errors specify an object attribute. The Document Generator is not recognizing them because the first letter is not capitalized. Make sure that every time you specify an object attribute in a tag, the first letter is capitalized.

A document is not generated correctly, and other means of troubleshooting fail.

If the debug level is activated, error information is written to the debug log. You may check this file for details on the problem.

The document template is generated successfully, but the letter generator hangs after selecting a document template.

At least one XML template is not well formed.

  1. Check for any un-escaped reserved characters (e.g. `&') in the XML template. If an un-escaped reserved character is found, please make the appropriate change in the XML template and test whether this resolves the issue.
  2. Check whether there are any begin/end tags missing from the XML template. For a migrated letter template, the missing begin/end tags are usually "filter@" or "loop@". Insert the missing begin/end tag mapping into the DM file and then use either Data Mapping Tool or EasyDocs Template Generator to re-generate the XML template.

Here is the syntax and example for end-tag mapping:

<MergeField name="filter@"><operation>filter</ operation>
<ownerPath><MERGEFIELD begin tag name>::</ ownerPath>
<dataPath></dataPath>
<conditionValue> </conditionValue>
<formatOption></formatOption>
</MergeField>
<MergeField name="filter@"><operation>filter</ operation>
<ownerPath>filter@Name0.2::</ownerPath>
<dataPath></dataPath>
<conditionValue> </conditionValue>

The XML template is generated successfully and the XML template is well formed, but launching Document Generator results in java.lang.StringIndexOutOfBoundExce ption.

Open the XML template and check whether element <BASE_TREEPOSITION> or <TREEPOSITION> exists. If either one of them exists in the XML, replace the corresponding <BASE_TREEPOSITION> or <TREEPOSITION> with the appropriate TeamConnect Object Definition unique code or category tree position in the XML template. If you replace the unique code / tree position in the DM file, please use either Data Mapping Tool or EasyDocs Template Generator to regenerate the XML template.

If the XML template does not contain either <BASE_TREEPOSITION> or <TREEPOSITION>, please report this issue to TeamConnect support for further assistance.

Additional Errors and Workarounds

If a line break is encountered in an XML file, in the middle of a token, it may cause an error message to be displayed. To fix the problems you must edit the XML file, removing the incorrect line breaks.

If the token is a merge field name, as shown below:

image

...then the resulting error message will look like this:

image

If the token containing the line break is a keyword instead, as shown below:

image

...then a different set of error messages will be displayed, as shown below:

image

image

  • Was this article helpful?