plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
254 stars 191 forks source link

zope.location.interfaces.LocationError: (<PloneSite at /xxxxxx>, 'get-current-language') #3551

Closed zopyx closed 2 years ago

zopyx commented 2 years ago

I see sometimes this kind of errors in Plone 6.0.0a4 (unclear how to reproduce or to make it specific to a particular add-on):

2022-06-04 11:03:23,217 INFO    [waitress:485][MainThread] Serving on http://0.0.0.0:42080
/Users/ajung/src/plone6.buildout/eggs/plone.app.contenttypes-3.0.0a11-py3.9.egg/plone/app/contenttypes/content.py:17: DeprecationWarning: safe_text is deprecated. Import from plone.base.utils instead (will be removed in Plone 7)
  from Products.CMFPlone.utils import safe_text
/Users/ajung/src/plone6.buildout/eggs/plone.app.layout-4.0.0a11-py3.9.egg/plone/app/layout/viewlets/common.py:298: DeprecationWarning: Use plone.base.utils.safe_text instead (will be removed in Plone 7)
  entry["title"] = escape(safe_unicode(entry["title"]))
2022-06-04 11:03:27,897 ERROR   [portlets:124][waitress-0] Error while determining renderer availability of portlet ('context' '/eteaching' 'actions'): @@get-current-language
Traceback (most recent call last):
  File "/Users/ajung/src/plone6.buildout/eggs/Zope-5.5.1-py3.9.egg/OFS/Traversable.py", line 236, in unrestrictedTraverse
    next = namespaceLookup(
  File "/Users/ajung/src/plone6.buildout/eggs/zope.traversing-4.4.1-py3.9.egg/zope/traversing/namespace.py", line 165, in namespaceLookup
    return traverser.traverse(name, ())
  File "/Users/ajung/src/plone6.buildout/eggs/Products.CMFPlone-6.0.0a4-py3.9.egg/Products/CMFPlone/earlypatches/security.py", line 14, in traverse
    return old_traverse(self, name, ignored)
  File "/Users/ajung/src/plone6.buildout/eggs/zope.traversing-4.4.1-py3.9.egg/zope/traversing/namespace.py", line 421, in traverse
    raise LocationError(self.context, name)
zope.location.interfaces.LocationError: (<PloneSite at /xxxxxx>, 'get-current-language')
zopyx commented 2 years ago

It seems to be tied to a custom control panel within my add-on (although there is nothing special there):

https://github.com/zopyx/zopyx.typesense/blob/master/src/zopyx/typesense/browser/controlpanel.py

zopyx commented 2 years ago

Invalid issue, issue on my side.