OneGov / plonetheme.onegov

Theme package for OneGov
http://www.onegov.ch
9 stars 15 forks source link

Navigation portlet relies on Title being there and fails when it isn't #28

Closed href closed 11 years ago

href commented 11 years ago

Creating an empty Plone site with just plonetheme.onegov installed will lead to errors in the navigation portlet:

Traceback (innermost last):
  Module plone.app.portlets.manager, line 63, in safe_render
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module zope.pagetemplate.pagetemplate, line 240, in __call__
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 852, in do_condition
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 533, in do_optTag_tal
  Module zope.tal.talinterpreter, line 518, in do_optTag
  Module zope.tal.talinterpreter, line 513, in no_tag
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 620, in do_insertText_tal
  Module Products.PageTemplates.Expressions, line 225, in evaluateText
  Module zope.tales.tales, line 696, in evaluate
   - URL: /Users/denis/Code/people/src/plonetheme.onegov/plonetheme/onegov/portlets/navigation.pt
   - Line 16, Column 10
   - Expression: <PathExpr standard:u'parent/Title'>
   - Names:
      {'args': (),
       'container': <ATDocument at /PHZ/front-page>,
       'context': <ATDocument at /PHZ/front-page>,
       'default': <object object at 0x10f02ab70>,
       'here': <ATDocument at /PHZ/front-page>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1141487e0>,
       'request': <HTTPRequest, URL=http://localhost:8080/PHZ/front-page/document_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x113dd6f90>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <plonetheme.onegov.portlets.navigation.Renderer object at 0x115a33910>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x115a443d0>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 147, in _eval
  Module zope.tales.expressions, line 124, in _eval
  Module Products.PageTemplates.Expressions, line 94, in trustedBoboAwareZopeTraverse
  Module OFS.Traversable, line 285, in unrestrictedTraverse
   - __traceback_info__: ([], 'Title')

As should be apparent, the Title attribute may be missing.

ninfaj commented 11 years ago

There was a problem if the context has defined a default page. I've fixed it. b8b3480b209b4a57021307896621132deceffede

ninfaj commented 11 years ago

It is not working yet... Just one moment :smiley: