Personal tools
You are here: Home Documentation Error References Nested page template errors
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Nested page template errors

Warning: This item is marked as outdated.

This Error Reference applies to: Plone 2.0.x
This Error Reference is intended for: Any audience.

If you have a page template which uses a macro, and the page template which defines the macro has an error, it's difficult to track down the error.

Say you have an Archetypes widget with its own view macro, or any other situation where you have a main page template which is using macros via metal:use-macro, defined in another file. If the "inner" macro - the one included by the main macro - has a PageTemplate syntax error, you may see an error like the following:

  Site error

  This site encountered an error trying to fulfill your request. The errors were:

  Error Type
      RuntimeError
  Error Message
      FS Page Template base_view has errors:    
  Products.PageTemplates.PageTemplate.PTRuntimeError.
      <pre>Page Template widget_imagesmanager has errors.</pre>
  Request made at
      2004/09/28 22:09:09.671 GMT+1

Clearly, the error is in widget_imagesmanager.pt (the included widget), but you are not told where or what is wrong.

To find out more information about the error, you can call the included page template directly. For instance, if you got this error from the template

http://myplonesite.com/documents/mydocument/base_view

you could go to

http://myplonesite.com/documents/mydocument/widget_imagesmanager

Obviously, substitute the name of the page template and the URL of your content object as appropriate.

If this gives you a "compilation failed" error, you'll be able to find out the exact tag and line number that's causing the template to fail. When you've fixed all "compilation failed" type errors, you may still get other errors (e.g. a "KeyError" or "NameError") because the page template is not expecting to be called on the content object directly. But it should now compile correctly and be correctly included in the outer macro.

by Martin Aspeli last modified October 28, 2004 - 09:17 All content is copyright Plone Foundation and the individual contributors.

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by