PTRuntimeError: FS Page Template my_template has errors
This Error Reference applies to:
Any version.
This Error Reference is intended for:
Any audience.
The error message will look something like this:
RuntimeError: FS Page Template my_template has errors: Products.PageTemplates.PageTemplate.PTRuntimeError.
This means that you should check the template source via Zope to get the real error message from the ZPT parser. There are two reasons you do this:
- Zope can give you a meaningful error message
- You should check where the template came from - because of acquisition or old customizations, it may be attempting to use the old template.
To check the above, go to <mysite>/my_template/manage_main. What you do is that you call the offending template separately (my_template) and show its ZMI page (manage_main)
The header shows something like the following:
Id: document_view Size: 1,474 bytes Last modified: 2004/12/09 06:43:39 GMT+1 Source file: CMFPlone/skins/plone_content/my_template.pt
The element to check here is the Source File. In this case it is coming from the CMFPlone product, which is probably what I want. If you are trying to show a forum_view in your own product, and you have another product installed that supplies a forum_view, this might be your error. Make sure it is the right template.
Another error that is quite common is that you customized a template, and forgot it when you upgraded/changed the product underneath it. Look for custom in the Source file part, and make sure it is still a valid template.
The meaningful error message is displayed inside the template content area, and can look like the following:
Compilation failed HTMLParser.HTMLParseError: malformed start tag, at line 9, column 1
In this case, it means you have a starting tag without an end tag at line 9. These errors are normally quite explicit, make sure you write valid XHTML at all times (close all tags, keep all attributes in quote marks, etc).