#25 — AttributeError: document_actions when trying to add a feed folder on Plone 4

State Tested and confirmed closed
Version: 1.0
Area User interface
Issue type Bug
Severity Medium
Submitted by Nate Aune
Submitted on Mar 14, 2010
Responsible Maurits van Rees
Target release:
When trying to add a feedfolder on Plone 4.0b1, the following error occurs:

Traceback (innermost last):
  Module ZPublisher.Publish, line 127, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 47, in call_object
  Module Products.feedfeeder.browser.feed, line 98, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 60, in __call__
  Module zope.pagetemplate.pagetemplate, line 115, in pt_render
   - Warning: Macro expansion failed
   - Warning: <type 'exceptions.AttributeError'>: document_actions
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 888, in do_useMacro
  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 888, in do_useMacro
  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 954, in do_defineSlot
  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 858, in do_defineMacro
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 946, in do_defineSlot
  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 946, in do_defineSlot
  Module zope.tal.talinterpreter, line 343, in interpret
  Module zope.tal.talinterpreter, line 867, in do_useMacro
  Module zope.tales.tales, line 696, in evaluate
   - URL: /Users/nateaune/.buildout/eggs/Products.feedfeeder-1.0-py2.6.egg/Products/feedfeeder/browser/feed-folder.pt
   - Line 15, Column 6
   - Expression: <PathExpr standard:u'context/document_actions/macros/document_actions'>
   - Names:
      {'args': (),
       'container': <FeedfeederFolder at /jaz/feeds>,
       'context': <FeedfeederFolder at /jaz/feeds>,
       'default': <object object at 0x10048db60>,
       'here': <FeedfeederFolder at /jaz/feeds>,
       'loop': {},
       'nothing': None,
       'options': {'template_id': 'feed-folder.html'},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x10a0455f0>,
       'request': <HTTPRequest, URL=http://localhost:8080/jaz/feeds/feed-folder.html>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x10822d7d0>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /Users/nateaune/.buildout/eggs/Products.feedfeeder-1.0-py2.6.egg/Products/feedfeeder/browser/feed-folder.pt object at 0x10ac2f310>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x10acff810>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 149, in _eval
  Module zope.tales.expressions, line 124, in _eval
  Module Products.PageTemplates.Expressions, line 96, in trustedBoboAwareZopeTraverse
  Module OFS.Traversable, line 278, in unrestrictedTraverse
   - __traceback_info__: ([], 'document_actions')
AttributeError: document_actions
Steps to reproduce:
install feedfeeder
add a new feed folder from the add new item menu
click save
Added by Maurits van Rees on Mar 15, 2010 10:15 PM
Issue state: UnconfirmedResolved
Responsible manager: (UNASSIGNED)maurits
Fixed on trunk in r113065, including similar fix for feed items. That looses the document actions and document byline on folders on Plone 4, which is not the nicest thing, but at least it's better than an error. And it keeps things as it is on Plone 2.5 (well, not tested lately, but should still work) and Plone 3(.3).

Apart from that, I see a double action 'update feed items' on Plone 4, which could use a fix, but at least it works. Patches accepted. :-) I don't much mind making trunk Plone 4 only btw.
Added by Maurits van Rees on Apr 02, 2010 10:49 PM
Issue state: ResolvedTested and confirmed closed
I released Products.feedfeeder 1.0.1 with this fix.

No responses can be added.