collective / collective.nitf

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

collective.nitf.image viewlet fails with getField #169

Closed hvelarde closed 8 years ago

hvelarde commented 8 years ago

Plone 4.3 with plone.app.contenttypes installed; creating a News Article and using the default view fails with the following error:

2016-07-19T17:22:41 ERROR plone.app.viewletmanager rendering of plone.abovecontentbody in collective.nitf.image fails: getField
Traceback (most recent call last):
  File "/opt/plone/smdu.portal/eggs/plone.app.viewletmanager-2.0.9-py2.7.egg/plone/app/viewletmanager/manager.py", line 110, in render
    html.append(viewlet.render())
  File "/opt/plone/smdu.portal/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/simpleviewclass.py", line 44, in __call__
    return self.index(*args, **kw)
  File "/opt/plone/smdu.portal/eggs/Zope2-2.13.24-py2.7.egg/Products/Five/browserpagetemplatefile.py", line 125, in __call__
    return self.im_func(im_self, *args, **kw)
  File "/opt/plone/smdu.portal/eggs/Zope2-2.13.24-py2.7.egg/Products/Five/browserpagetemplatefile.py", line 59, in __call__
    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
  File "/opt/plone/smdu.portal/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplatepagetemplate.py", line 132, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/opt/plone/smdu.portal/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplatepagetemplate.py", line 240, in __call__
    interpreter()
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 271, in __call__
    self.interpret(self.program)
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 852, in do_condition
    self.interpret(block)
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 531, in do_optTag_tal
    self.no_tag(stuff[-2], stuff[-1])
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 513, in no_tag
    self.interpret(program)
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 343, in interpret
    handlers[opcode](self, args)
  File "/opt/plone/smdu.portal/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/talinterpreter.py", line 742, in do_insertStructure_tal
    structure = self.engine.evaluateStructure(expr)
  File "/opt/plone/smdu.portal/eggs/Zope2-2.13.24-py2.7.egg/Products/PageTemplates/Expressions.py", line 218, in evaluateStructure
    text = super(ZopeContext, self).evaluateStructure(expr)
  File "/opt/plone/smdu.portal/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/tales.py", line 696, in evaluate
    return expression(self)
  File "/opt/plone/smdu.portal/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 217, in __call__
    return self._eval(econtext)
  File "/opt/plone/smdu.portal/eggs/Zope2-2.13.24-py2.7.egg/Products/PageTemplates/Expressions.py", line 147, in _eval
    ob = self._subexprs[-1](econtext)
  File "/opt/plone/smdu.portal/eggs/zope.tales-3.5.3-py2.7.egg/zope/tales/expressions.py", line 124, in _eval
    ob = self._traverser(ob, element, econtext)
  File "/opt/plone/smdu.portal/eggs/Zope2-2.13.24-py2.7.egg/Products/PageTemplates/Expressions.py", line 97, in trustedBoboAwareZopeTraverse
    request=request)
  File "/opt/plone/smdu.portal/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py", line 136, in traversePathElement
    return traversable.traverse(nm, further_path)
  File "/opt/plone/smdu.portal/eggs/plone.app.imaging-1.0.13-py2.7.egg/plone/app/imaging/scaling.py", line 121, in traverse
    field = self.field(name)
  File "/opt/plone/smdu.portal/eggs/plone.app.imaging-1.0.13-py2.7.egg/plone/app/imaging/scaling.py", line 147, in field
    return self.context.getField(fieldname)
AttributeError: getField