collective / collective.nitf

A Dexterity-based content type inspired on the News Industry Text Format specification
8 stars 3 forks source link

AttributeError on text_only_view #155

Open hvelarde opened 8 years ago

hvelarde commented 8 years ago

The following error happens when accessing a news article with the text_only_view template applied

2016-03-07T17:27:18 ERROR plone.app.textfield Transform exception
Traceback (most recent call last):
  File "/home/plone/my.package/eggs/plone.app.textfield-1.2.5-py2.7.egg/plone/app/textfield/transform.py", line 44, in __call__
    encoding=value.encoding)
  File "/home/plone/my.package/eggs/Products.PortalTransforms-2.1.6-py2.7.egg/Products/PortalTransforms/TransformEngine.py", line 173, in convertTo
    usedby=usedby, **kwargs)
  File "/home/plone/my.package/eggs/Products.PortalTransforms-2.1.6-py2.7.egg/Products/PortalTransforms/chain.py", line 54, in convert
    data = transform.convert(orig, data, **kwargs)
  File "/home/plone/my.package/eggs/Products.PortalTransforms-2.1.6-py2.7.egg/Products/PortalTransforms/Transform.py", line 198, in convert
    return self._v_transform.convert(*args, **kwargs)
  File "/home/plone/my.package/eggs/plone.outputfilters-1.15-py2.7.egg/plone/outputfilters/transforms/html_to_plone_outputfilters_html.py", line 47, in convert
    res = apply_filters(filters, orig)
  File "/home/plone/my.package/eggs/plone.outputfilters-1.15-py2.7.egg/plone/outputfilters/__init__.py", line 6, in apply_filters
    res = filter(data)
  File "/home/plone/my.package/eggs/plone.outputfilters-1.15-py2.7.egg/plone/outputfilters/filters/resolveuid_and_caption.py", line 120, in __call__
    self.feed(data)
  File "/usr/lib/python2.7/sgmllib.py", line 104, in feed
    self.goahead(0)
  File "/usr/lib/python2.7/sgmllib.py", line 138, in goahead
    k = self.parse_starttag(i)
  File "/usr/lib/python2.7/sgmllib.py", line 296, in parse_starttag
    self.finish_starttag(tag, attrs)
  File "/usr/lib/python2.7/sgmllib.py", line 338, in finish_starttag
    self.unknown_starttag(tag, attrs)
  File "/home/plone/my.package/eggs/plone.outputfilters-1.15-py2.7.egg/plone/outputfilters/filters/resolveuid_and_caption.py", line 358, in unknown_starttag
    caption)
  File "/home/plone/my.package/eggs/plone.outputfilters-1.15-py2.7.egg/plone/outputfilters/filters/resolveuid_and_caption.py", line 310, in handle_captioned_image
    captioned_html = self.captioned_image_template(**options)
  File "/home/plone/my.package/eggs/plone.outputfilters-1.15-py2.7.egg/plone/outputfilters/browser/captioned_image.py", line 19, in __call__
    return self.template(**options)
AttributeError: __call__
------
2016-03-07T17:27:18 ERROR Zope.SiteErrorLog 1457382438.10.0881681279011 http://10.10.0.225:6081/pt-br/noticias/adhemar-ferreira-da-silva-o-brasileiro-que-nasceu-para-o-aplauso/text_only_view
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module plone.autoform.view, line 47, in __call__
  Module plone.autoform.view, line 38, in 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 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 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 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 583, in do_setLocal_tal
  Module zope.tales.tales, line 696, in evaluate
   - URL: /home/plone/my.package/eggs/collective.nitf-2.0b1-py2.7.egg/collective/nitf/browser/templates/view.pt
   - Line 17, Column 6
   - Expression: <PathExpr standard:u'context/text/output|nothing'>
   - Names:
      {'args': (),
       'container': <NITF at /pt-br/noticias/adhemar-ferreira-da-silva-o-brasileiro-que-nasceu-para-o-aplauso>,
       'context': <NITF at /pt-br/noticias/adhemar-ferreira-da-silva-o-brasileiro-que-nasceu-para-o-aplauso>,
       'default': <object object at 0x7ff7f484b500>,
       'here': <NITF at /pt-br/noticias/adhemar-ferreira-da-silva-o-brasileiro-que-nasceu-para-o-aplauso>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7ff7bbf10838>,
       'request': <HTTPRequest, URL=http://10.10.0.225:6081/pt-br/noticias/adhemar-ferreira-da-silva-o-brasileiro-que-nasceu-para-o-aplauso/text_only_view>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7ff7d4f2c3d0>,
       'traverse_subpath': [],
       'user': <SpecialUser 'Anonymous User'>,
       'view': <Products.Five.metaclass.SimpleViewClass from /home/plone/my.package/eggs/collective.nitf-2.0b1-py2.7.egg/collective/nitf/browser/templates/view.pt object at 0x7ff7b007f8d0>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7ff7b8bb1f10>}
  Module zope.tales.expressions, line 217, in __call__
  Module Products.PageTemplates.Expressions, line 140, in _eval
  Module zope.tales.expressions, line 124, in _eval
  Module Products.PageTemplates.Expressions, line 97, in trustedBoboAwareZopeTraverse
  Module zope.traversing.adapters, line 136, in traversePathElement
   - __traceback_info__: (RichTextValue object. (Did you mean <attribute>.raw or <attribute>.output?), 'output')
  Module zope.traversing.adapters, line 42, in traverse
   - __traceback_info__: (RichTextValue object. (Did you mean <attribute>.raw or <attribute>.output?), 'output', [])
  Module plone.app.textfield.value, line 78, in output
  Module plone.app.textfield.value, line 104, in output_relative_to
  Module plone.app.textfield.transform, line 67, in __call__
TransformError: Error during transformation