Plone site (4.3.15, +bda.plone.shop) sometimes can't find portal_languages tool

I have a Plone site which I recently updated from some 4.3.3-based version to 4.3.15 (which needed to be done in any case, of course); I'd like to replace my proprietary shop development by the integration of bda.plone.shop. My roadmap looks like this:

  1. Update to 4.3.15 (done, as far as the buildout is concerned; possibly still fixes in my code necessary)
  2. Installation of bda.plone.shop (done, with a little 4.3 compatibility fix)
  3. Make bda.plone.shop run
  4. Make existing content buyable, based on bda.plone.shop
  5. Replace my existing order/booking system by the use of bda.plone.shop

So far I was able to install bda.plone.shop, but sadly not all components do work; e.g., if I visit the shopping cart (@@cart), I see a traceback in the shell window which tells me that somehow the portal_languages tool has been seeked and not found:

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

When I have a look in the ZMI, the portal_languages tool is clearly there; in a bin/instance debug session:

>>> from Products.CMFCore.utils import getToolByName
>>> language_tool = getToolByName(app.plone, 'portal_languages')
>>> language_tool.getSupportedLanguages()
['de', 'en']

So it looks to me like getToolByName is called in a wrong way somewhere, and I wonder about the reason.

Perhaps the bda.plone.shop code makes assumptions about package versions which are not pinned for Plone 4.3.x?
This sounds likely to me, since a little fix (pull requested, discussed, enhanced and accepted) has been necessary to make Zope start again with bda.plone.shop installed.

Any help is appreciated - thank you!

I would add a new Plone site and install bda.plone.shop on that and see if it works.

Also, you could consider to upgrade to Plone 5, bda.plone.shop should work ( I gave it a try once and got it to run on Plone 5. (can't remember which version)

Also: make sure you dont have any templates in /portal_skins/custom

while I don't know anything about this add-on, I'd go so far as to say that your problem is probably to be expected, from:

"bda.plone.shop won't work on stock Plone 4.3.x installations because it requires some packages in more recent versions:

plone.app.workflow >= 2.1.8
plone.app.users >= 2.0.4"

As pointed out here https://github.com/bluedynamics/bda.plone.shop/issues/104#issuecomment-364516610 i suspect LinguaPlone causing this issue.

For the records - the problem has been solved, by a pull request to bda.plone.shop; thanks to all who answered.

Of course I used the version pinnings given by that add-on.