It could be an error in the site_actions.pt.

I would have started with making an "empty" template and see if the error persists.

If there are no errors in the template, maybe the permissions (zope2.view) are not enough for what its trying to do. (I had the same kind of problem when customizing the search, and (noone) could figure out what permissions was needed..

espen





Den 15. des. 2008 kl. 09.45 skrev hannesc:


I am trying to create a custom viewlet for a theme I am working on. In my
browser/configure.zcml I have the following code:

<browser:viewlet
        name="sentech.site_actions"
        manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
                layer=".interfaces.IThemeSpecific"
        template="templates/site_actions.pt"
        permission="zope2.View"
        />

When I try open the site though it won't render, instead it gives me the
following error:

TraversalError
(, 'site_actions') (Also, the following error occurred while attempting to
render the standard error message, please see the event log for full
details: (<Products.Five.viewlet.viewlet.SimpleViewletClass from
/home/hannes/myzope/src/sentech.theme/sentech/theme/browser/ templates/site_actions.pt object at 0xe021aac>, 'site_actions'))Traceback (innermost last): Module
ZPublisher.Publish, line 202, in publish_module_standard Module
ZPublisher.Publish, line 150, in publish Module
plone.app.linkintegrity.monkey, line 21, in
zpublisher_exception_hook_wrapper Module Zope2.App.startup, line 221, in zpublisher_exception_hook Module ZPublisher.Publish, line 119, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 42, in call_object Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module
Products.CMFCore.FSPageTemplate, line 216, in _exec Module
Products.CMFCore.FSPageTemplate, line 155, in pt_render Module
Products.PageTemplates.PageTemplate, line 89, in pt_render Module
zope.pagetemplate.pagetemplate, line 117, in pt_render Module
zope.tal.talinterpreter, line 271, in __call__ Module
zope.tal.talinterpreter, line 346, in interpret Module
zope.tal.talinterpreter, line 891, in do_useMacro Module
zope.tal.talinterpreter, line 346, in interpret Module
zope.tal.talinterpreter, line 536, in do_optTag_tal Module
zope.tal.talinterpreter, line 521, in do_optTag Module
zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter,
line 346, in interpret Module zope.tal.talinterpreter, line 534, in
do_optTag_tal Module zope.tal.talinterpreter, line 516, in no_tag Module
zope.tal.talinterpreter, line 346, in interpret Module
zope.tal.talinterpreter, line 745, in do_insertStructure_tal Module
Products.PageTemplates.Expressions, line 221, in evaluateStructure Module
zope.tales.tales, line 696, in evaluate - URL:
file:/home/hannes/myzope/src/sentech.theme/sentech/theme/skins/ sentech_theme_custom_templates/main_template.pt - Line 117, Column 8 - Expression: - Names: {'container': , 'context': , 'default': , 'here': , 'loop': {}, 'nothing': None, 'options': {'args': ()}, 'repeat': , 'request': , 'root': , 'template': , 'traverse_subpath': [],
'user': } Module Products.Five.browser.providerexpression, line 37, in
__call__ Module plone.app.viewletmanager.manager, line 151, in render Module
plone.app.viewletmanager.manager, line 80, in render Module
zope.app.pagetemplate.simpleviewclass, line 44, in __call__ Module
Shared.DC.Scripts.Bindings, line 313, in __call__ Module
Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module
Products.PageTemplates.PageTemplateFile, line 129, in _exec Module
Products.PageTemplates.PageTemplate, line 89, in pt_render Module
zope.pagetemplate.pagetemplate, line 117, in pt_render Module
zope.tal.talinterpreter, line 271, in __call__ Module
zope.tal.talinterpreter, line 346, in interpret Module
zope.tal.talinterpreter, line 534, in do_optTag_tal Module
zope.tal.talinterpreter, line 516, in no_tag Module zope.tal.talinterpreter,
line 346, in interpret Module zope.tal.talinterpreter, line 745, in
do_insertStructure_tal Module Products.PageTemplates.Expressions, line 221, in evaluateStructure Module zope.tales.tales, line 696, in evaluate - URL: index - Line 2, Column 0 - Expression: - Names: {'container': , 'context': , 'default': , 'here': , 'loop': {}, 'nothing': None, 'options': {'args': ()}, 'repeat': , 'request': , 'root': , 'template': , 'traverse_subpath': [],
'user': , 'view': , 'views': } Module
Products.Five.browser.providerexpression, line 37, in __call__ Module
plone.app.viewletmanager.manager, line 151, in render Module
plone.app.viewletmanager.manager, line 80, in render Module
zope.app.pagetemplate.simpleviewclass, line 44, in __call__ Module
Shared.DC.Scripts.Bindings, line 313, in __call__ Module
Shared.DC.Scripts.Bindings, line 350, in _bindAndExec Module
Products.PageTemplates.PageTemplateFile, line 129, in _exec Module
Products.PageTemplates.PageTemplate, line 89, in pt_render Module
zope.pagetemplate.pagetemplate, line 117, in pt_render Module
zope.tal.talinterpreter, line 271, in __call__ Module
zope.tal.talinterpreter, line 346, in interpret Module
zope.tal.talinterpreter, line 854, in do_condition Module
Products.PageTemplates.Expressions, line 211, in evaluateBoolean Module zope.tales.tales, line 696, in evaluate - URL: index - Line 1, Column 0 - Expression: - Names: {'container': , 'context': , 'default': , 'here': , 'loop': {}, 'nothing': None, 'options': {'args': ()}, 'repeat': , 'request':
, 'root': , 'template': , 'traverse_subpath': [], 'user': , 'view': ,
'views': } Module zope.tales.expressions, line 217, in __call__ Module
Products.PageTemplates.Expressions, line 153, in _eval Module
zope.tales.expressions, line 124, in _eval Module
Products.PageTemplates.Expressions, line 103, in
trustedBoboAwareZopeTraverse Module zope.traversing.adapters, line 164, in
traversePathElement - __traceback_info__: (, 'site_actions') Module
zope.traversing.adapters, line 52, in traverse - __traceback_info__: (,
'site_actions', []) TraversalError: (see above)

What could I be doing wrong? Thanks :)
--
View this message in context: http://n2.nabble.com/Creating-a- custom-viewlet-tp1657352p1657352.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to