collective / collective.nitf

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

Unable to get the portal object on tile #149

Open hvelarde opened 8 years ago

hvelarde commented 8 years ago

On customer's log I see a bunch of errors like this one:

2015-11-11T17:25:15 ERROR Zope.SiteErrorLog 1447269915.420.274622852238 http://10.133.255.48:6081/capa/@@collective.nitf/d175382bf5f84a5c939de4f816aceb98
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.tiles.esi, line 59, in __call__
  Module zope.browserpage.viewpagetemplatefile, line 83, in __call__
  Module zope.browserpage.viewpagetemplatefile, line 51, 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 851, in do_condition
  Module zope.tales.tales, line 701, in evaluateBoolean
  Module zope.tales.tales, line 696, in evaluate
   - URL: /home/customer/project/src/collective.nitf/src/collective/nitf/tiles/nitf.pt
   - Line 13, Column 2
   - Expression: <NotExpr u'is_empty'>
   - Names:
      {'args': (),
       'context': <webdav.NullResource.NullResource object at 0x7f2d29abc230>,
       'default': <object object at 0x7f2d6cc8c500>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <HTTPRequest, URL=http://10.133.255.48:6081/capa/@@collective.nitf/d175382bf5f84a5c939de4f816aceb98>,
       'template': <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x7f2d594ffa50>,
       'view': <Products.Five.metaclass.NITFTile object at 0x7f2d2b3933d0>,
       'views': <zope.browserpage.viewpagetemplatefile.ViewMapper object at 0x7f2d2b393350>}
  Module zope.tales.expressions, line 282, in __call__
  Module zope.tales.tales, line 701, in evaluateBoolean
  Module zope.tales.tales, line 696, in evaluate
   - URL: /home/customer/project/src/collective.nitf/src/collective/nitf/tiles/nitf.pt
   - Line 13, Column 2
   - Expression: <PathExpr standard:u'is_empty'>
   - Names:
      {'args': (),
       'context': <webdav.NullResource.NullResource object at 0x7f2d29abc230>,
       'default': <object object at 0x7f2d6cc8c500>,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <HTTPRequest, URL=http://10.133.255.48:6081/capa/@@collective.nitf/d175382bf5f84a5c939de4f816aceb98>,
       'template': <zope.browserpage.viewpagetemplatefile.ViewPageTemplateFile object at 0x7f2d594ffa50>,
       'view': <Products.Five.metaclass.NITFTile object at 0x7f2d2b3933d0>,
       'views': <zope.browserpage.viewpagetemplatefile.ViewMapper object at 0x7f2d2b393350>}
  Module zope.tales.expressions, line 217, in __call__
  Module zope.tales.expressions, line 211, in _eval
  Module collective.cover.tiles.basic, line 83, in is_empty
  Module plone.memoize.instance, line 51, in memogetter
  Module collective.cover.tiles.basic, line 71, in brain
  Module plone.api.portal, line 2, in get_tool
  Module plone.api.validation, line 70, in wrapped
  Module plone.api.portal, line 101, in get_tool
  Module plone.api.portal, line 65, in get
CannotGetPortalError: Unable to get the portal object. More info on https://ploneapi.readthedocs.org/en/latest/api/exceptions.html#plone.api.exc.CannotGetPortalError

the associated entry on the web server log shows that the error happened while composing the cover of the site:

100.200.200.100 - - [11/Nov/2015:17:25:15 -0200] "GET /capa/@@collective.nitf/d175382bf5f84a5c939de4f816aceb98/@@images/f120b1cd-b2e0-473e-8a74-279e1ddb4393.jpeg HTTP/1.1" 200 51315 "http://www.customer.com.br/capa/compose?_authenticator=02ce51700d389a0e80a78e70b09acc9d9aee68bd" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0"