Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Shop" portlet won't work in /@@ views (portal_languages not found; Plone 4.3.15) #104

Open
tobiasherp opened this issue Feb 9, 2018 · 2 comments

Comments

@tobiasherp
Copy link
Contributor

During my efforts to familiarize with bda.plone.org, I noticed that the "Shop" portlet doesn't work when e.g. the @@shop_controlpanel (and all others I tried) is called in the site root: below the Cart viewlet (which links to /@@cart) I get an error (msgid "text_error_rendering_portlet"), and two identical tracebacks in the error log:

Traceback (innermost last):
  Module Products.PloneFormGen.patches, line 21, in safe_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 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 819, in do_loop_tal
  Module zope.tales.tales, line 685, in setRepeat
  Module zope.tales.tales, line 110, in __init__
  Module bda.plone.shop.browser.navigation, line 199, in links
  Module bda.plone.shop.browser.navigation, line 106, in lookup_navigation_items
  Module bda.plone.shop.browser.navigation, line 104, in unsorted_items
  Module zope.component.registry, line 250, in getAdapters
  Module bda.plone.shop.browser.navigation, line 659, in __init__
  Module bda.plone.shop.browser.navigation, line 165, in context_is_default_page
  Module Products.LinguaPlone.browser.defaultpage, line 23, in getDefaultPage
  Module Products.CMFCore.utils, line 10, in check_getToolByName
  Module Products.CMFCore.utils, line 120, in getToolByName
AttributeError: portal_languages

Having a look in the ZMI, the portal_languages tool is clearly present. In other contexts down the tree, the portlet seems to work.

Is there perhaps some Plone 4.3.15 compatibility issue?

@rnixx
Copy link
Member

rnixx commented Feb 9, 2018

I see you have Lingua Plone installed. I fear you need to dig down here
https://github.com/bluedynamics/bda.plone.shop/blob/master/src/bda/plone/shop/browser/navigation.py#L165 and step into Products.LinguaPlone.browser.defaultpage to get a clue what's wrong

@tobiasherp
Copy link
Contributor Author

Ok, I had a look.

IMO, the problem is unrelated to LinguaPlone; rather, the aq_parent call in line 162 should be dropped. With this line present, the portal_languages tool is seeked in the Zope root instead in the Plone site (which fails, of course). See #105.

tobiasherp added a commit to visaplan/bda.plone.shop that referenced this issue Feb 12, 2018
agitator pushed a commit that referenced this issue Feb 6, 2019
The solution for #104 proposed by @rnixx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants