Multilingual issue

Hi,

I have the next issue with my Plone site, I have installed "Multilingual" addon and laters left the next message in main site and above..

AttributeError("'RequestContainer' object has no attribute 'portal_factory'",) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: 'RequestContainer' object has no attribute 'portal_factory')

Please help, the site didn't works anymore..

Thank you.

If you report exceptions (typically indicated by a suffix Error), the traceback information is of high importance. Usually, you find the traceback information in the error_log object (--> <url_to_your_plone>/error_log/manage_main) or in the logfile (--> var/[client1|instance]/event.log).

In your specific case, it may be possible that no traceback is available: the traceback is saved as part of the error handling - and in your case, this partially fails. But, nevertheless take a look whether there is a traceback for this problem.

It may be necessary, that you login outside your Plone portal (i.e. in the Zope root folder) before you can access error_log, as the Plone login might be affected by the problem. For this, you access in your browser <url_to_your_zope>/manage (this should give you a login request) and login as a Zope manager. If you have not yet created a Zope manager, you can do this with the command bin/[instance|client1] adduser.

Whether in the above you use instance or client1 depends on your Plone installation type: you use client1 for a ZEO installation, otherwise, instance.

Hi, after a default installation of Plone 5.1 you have two "multi lingual" settings in the AddOns section. If you enable the Multilingual Support (Archetypes) AddOn, you render the Plone site unuseable. Because it looks like that each page (or cached URL in the browser, e.g. http://127.0.0.1:8080/Plone/@@language-controlpanel) causes this error

2019-02-08 15:47:21 ERROR root Exception while rendering an error message
Traceback (most recent call last):
File "/mnt/data/cur/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/OFS/SimpleItem.py", line 242, in raise_standardErrorMessage
v = s(**kwargs)
File "/mnt/data/cur/buildout-cache/eggs/Products.CMFCore-2.2.12-py2.7.egg/Products/CMFCore/FSPythonScript.py", line 127, in call
return Script.call(self, *args, **kw)
File "/mnt/data/cur/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 322, in call
return self._bindAndExec(args, kw, None)
File "/mnt/data/cur/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
return self._exec(bound_data, args, kw)
File "/mnt/data/cur/buildout-cache/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 44, in standard_error_message
File "/mnt/data/cur/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 322, in call
return self._bindAndExec(args, kw, None)
File "/mnt/data/cur/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 359, in _bindAndExec
return self._exec(bound_data, args, kw)
File "/mnt/data/cur/buildout-cache/eggs/Products.CMFCore-2.2.12-py2.7.egg/Products/CMFCore/FSPageTemplate.py", line 237, in _exec
result = self.pt_render(extra_context=bound_names)
File "/mnt/data/cur/buildout-cache/eggs/Products.CMFCore-2.2.12-py2.7.egg/Products/CMFCore/FSPageTemplate.py", line 177, in pt_render
self, source, extra_context
File "/mnt/data/cur/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Products/PageTemplates/PageTemplate.py", line 87, in pt_render
showtal=showtal)
File "/mnt/data/cur/buildout-cache/eggs/zope.pagetemplate-4.2.1-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 137, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations
File "/mnt/data/cur/buildout-cache/eggs/five.pt-2.2.5-py2.7.egg/five/pt/engine.py", line 98, in call
return self.template.render(**kwargs)
File "/mnt/data/cur/buildout-cache/eggs/z3c.pt-3.0.0a1-py2.7.egg/z3c/pt/pagetemplate.py", line 163, in render
return base_renderer(**context)
File "/mnt/data/cur/buildout-cache/eggs/Chameleon-2.25-py2.7.egg/chameleon/zpt/template.py", line 261, in render
return super(PageTemplate, self).render(**vars)
File "/mnt/data/cur/buildout-cache/eggs/Chameleon-2.25-py2.7.egg/chameleon/template.py", line 191, in render
raise_with_traceback(exc, tb)
File "/mnt/data/cur/buildout-cache/eggs/Chameleon-2.25-py2.7.egg/chameleon/template.py", line 171, in render
self._render(stream, econtext, rcontext)
File "9ec4eb833a24a6aa8e7afd06c9d50702.py", line 1492, in render
File "7aecce8d151bcb885e11d847b24a6868.py", line 1192, in render_master
File "/mnt/data/cur/buildout-cache/eggs/z3c.pt-3.0.0a1-py2.7.egg/z3c/pt/expressions.py", line 71, in render_content_provider
cp.update()
File "/mnt/data/cur/buildout-cache/eggs/zope.viewlet-3.7.2-py2.7.egg/zope/viewlet/manager.py", line 112, in update
self._updateViewlets()
File "/mnt/data/cur/buildout-cache/eggs/zope.viewlet-3.7.2-py2.7.egg/zope/viewlet/manager.py", line 118, in _updateViewlets
viewlet.update()
File "/mnt/data/cur/buildout-cache/eggs/archetypes.multilingual-3.0.6-py2.7.egg/archetypes/multilingual/browser/viewlets.py", line 27, in update
if self.context.portal_factory.isTemporary(self.context):
AttributeError: 'RequestContainer' object has no attribute 'portal_factory'

  • Expression: "provider:plone.abovecontent"
  • Filename: ... egg/Products/CMFPlone/browser/templates/main_template.pt
  • Location: (line 67: col 59)
  • Source: ...
    ^
  • Arguments: repeat: {...} (0)
    template: <ImplicitAcquisitionWrapper default_error_message at 0x7f3301de8730>
    modules: <instance - at 0x7f330a393638>
    here: <ImplicitAcquisitionWrapper portal_quickinstaller at 0x7f3301e3b1e0>
    user: <ImplicitAcquisitionWrapper - at 0x7f3301fd2af0>
    nothing: <NoneType - at 0x55eaf26af4d0>
    container: <ImplicitAcquisitionWrapper drawio at 0x7f3302838e60>
    default: <object - at 0x7f3312adf540>
    request: <instance - at 0x7f330072dfc8>
    wrapped_repeat: <SafeMapping - at 0x7f33002d2788>
    traverse_subpath: <list - at 0x7f33000b2dd0>
    loop: {...} (0)
    context: <ImplicitAcquisitionWrapper portal_quickinstaller at 0x7f3301e3b1e0>
    translate: <function translate at 0x7f32ffffae60>
    root: <ImplicitAcquisitionWrapper Zope at 0x7f330287f820>
    options: {...} (9)
    target_language: <NoneType - at 0x55eaf26af4d0>

Hi there, had you solved your problem yet? I'm having this issue too and looking for a solution. Mind sharing yours?

I just wanted to mention that this issue still exists for me in Plone 5.1.5. If I create a brand new site, and install the archetypes.multilingual add-on, it apparently hoses the site. Trying to go to any page or the root or site setup produces the following error:

2019-09-26 12:14:26 ERROR Zope.SiteErrorLog 1569518066.690.745403494701 http://localhost:8080/Plone2/prefs_install_products_form
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 Products.CMFPlone.controlpanel.browser.quickinstaller, line 508, in __call__
  Module Products.Five.browser.pagetemplatefile, line 125, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 137, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 163, in render
  Module chameleon.zpt.template, line 261, in render
  Module chameleon.template, line 191, in render
  Module chameleon.template, line 171, in render
  Module a60c0ca7c3ce344929b0ee5687110110.py, line 2155, in render
  Module 2f8c135e80dfacdf886b78e68b8526ef.py, line 282, in render_master
  Module d01e8aaf75046be8c9c118cddfc4e954.py, line 1192, in render_master
  Module z3c.pt.expressions, line 71, in render_content_provider
  Module zope.viewlet.manager, line 112, in update
  Module zope.viewlet.manager, line 118, in _updateViewlets
  Module archetypes.multilingual.browser.viewlets, line 27, in update
AttributeError: 'RequestContainer' object has no attribute 'portal_factory'

 - Expression: "provider:plone.abovecontent"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 67: col 59)
 - Source:     ...
                                       ^
 - Arguments:  repeat: {...} (0)
               template: <ViewPageTemplateFile - at 0x11ebf43d0>
               views: <ViewMapper - at 0x11eb1fe50>
               modules: <instance - at 0x10d8765f0>
               args: <tuple - at 0x10cc46050>
               here: <ImplicitAcquisitionWrapper Plone2 at 0x11e82c320>
               user: <ImplicitAcquisitionWrapper - at 0x11ec2cd70>
               nothing: <NoneType - at 0x10cbb6f28>
               container: <ImplicitAcquisitionWrapper Plone2 at 0x11e82c320>
               request: <instance - at 0x11d1f0638>
               wrapped_repeat: <SafeMapping - at 0x11ca3bba8>
               traverse_subpath: <list - at 0x11c8ac560>
               default: <object - at 0x10cc9cae0>
               loop: {...} (0)
               context: <ImplicitAcquisitionWrapper Plone2 at 0x11e82c320>
               view: <SimpleViewClass from /Users/zach/Plone/buildout-cache/eggs/Products.CMFPlone-5.1.5-py2.7.egg/Products/CMFPlone/controlpanel/browser/quickinstaller.pt prefs_install_products_form at 0x11ebce690>
               translate: <function translate at 0x11e7a0668>
               root: <ImplicitAcquisitionWrapper Zope at 0x11ec27dc0>
               options: {...} (0)
               target_language: <NoneType - at 0x10cbb6f28>
2019-09-26 12:14:27 ERROR root Exception while rendering an error message

We don't use this package, but I'm just wondering if it needs to be included in the standard buildout for Plone 5.1.5 at least (not sure if it's included in 5.2+). My only worry is that someone who may not know what they're doing could try to enable multilingual behavior on one of our client sites and damage that site. If it's not compatible, it should be fixed or removed as a default add-on.

Plone Foundation Code of Conduct