plone/plone.app.layout

TypeError: isTemporary() takes exactly 2 arguments (1 given)

Closed this issue · 1 comments

From time to time our servers are getting this traceback:

Exception while rendering an error message
Traceback (most recent call last):
  File "/home/service/.buildout/eggs/Zope2-2.13.22-py2.7.egg/OFS/SimpleItem.py", line 242, in raise_standardErrorMessage
    v = s(**kwargs)
  File "/home/service/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/FSPythonScript.py", line 127, in __call__
    return Script.__call__(self, *args, **kw)
  File "/home/service/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__
    return self._bindAndExec(args, kw, None)
  File "/home/service/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/home/service/.buildout/eggs/Products.PythonScripts-2.13.2-py2.7.egg/Products/PythonScripts/PythonScript.py", line 344, in _exec
    result = f(*args, **kw)
  File "Script (Python)", line 34, in standard_error_message
  File "/home/service/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__
    return self._bindAndExec(args, kw, None)
  File "/home/service/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
    return self._exec(bound_data, args, kw)
  File "/home/service/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/FSPageTemplate.py", line 237, in _exec
    result = self.pt_render(extra_context=bound_names)
  File "/home/service/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/FSPageTemplate.py", line 177, in pt_render
    self, source, extra_context
  File "/home/service/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Products/PageTemplates/PageTemplate.py", line 79, in pt_render
    showtal=showtal)
  File "/home/service/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
    strictinsert=0, sourceAnnotations=sourceAnnotations
  File "/home/service/.buildout/eggs/five.pt-2.2.2-py2.7.egg/five/pt/engine.py", line 93, in __call__
    return self.template.render(**kwargs)
  File "/home/service/.buildout/eggs/z3c.pt-2.2.3-py2.7.egg/z3c/pt/pagetemplate.py", line 149, in render
    return base_renderer(**context)
  File "/home/service/.buildout/eggs/Chameleon-2.22-py2.7.egg/chameleon/zpt/template.py", line 258, in render
    return super(PageTemplate, self).render(**vars)
  File "/home/service/.buildout/eggs/Chameleon-2.22-py2.7.egg/chameleon/template.py", line 191, in render
    raise_with_traceback(exc, tb)
  File "/home/service/.buildout/eggs/Chameleon-2.22-py2.7.egg/chameleon/template.py", line 171, in render
    self._render(stream, econtext, rcontext)
  File "7fef951de17bbb3ff884198d00ece915.py", line 866, in render
  File "f2659a17c90547afc4d3b61091703477.py", line 1001, in render_master
  File "/home/service/.buildout/eggs/z3c.pt-2.2.3-py2.7.egg/z3c/pt/expressions.py", line 58, in render_content_provider
    cp.update()
  File "/home/service/.buildout/eggs/zope.viewlet-3.7.2-py2.7.egg/zope/viewlet/manager.py", line 112, in update
    self._updateViewlets()
  File "/home/service/.buildout/eggs/zope.viewlet-3.7.2-py2.7.egg/zope/viewlet/manager.py", line 118, in _updateViewlets
    viewlet.update()
  File "/home/service/.buildout/eggs/plone.app.layout-2.3.13-py2.7.egg/plone/app/layout/viewlets/common.py", line 93, in update
    if self.page_title == portal_title:
  File "/home/service/.buildout/eggs/plone.memoize-1.1.1-py2.7.egg/plone/memoize/view.py", line 47, in memogetter
    value = cache[key] = func(*args, **kwargs)
  File "/home/service/.buildout/eggs/plone.app.layout-2.3.13-py2.7.egg/plone/app/layout/viewlets/common.py", line 73, in page_title
    self.context.isTemporary()):
TypeError: isTemporary() takes exactly 2 arguments (1 given)

Searching for isTemporary only yields:

gil@patam:omelette $ grep -R --include=*.py 'def isTemporary' *
Products/CMFPlone/FactoryTool.py:362:    def isTemporary(self, obj):
Products/CMFPlone/interfaces/FactoryTool.py:33:    def isTemporary(obj):
Products/Archetypes/BaseObject.py:1028:    def isTemporary(self):

So I guess that this traceback ends on Products.CMFPlone.FactoryTool, plone.app.layout.viewlets.common.py on page_title method should be updated to also provide the object as well? Or FactoryTool should be updated to not ask for it? That's why I didn't create a PR...

outdated