A possible bug in plone.app.multilingual /Please Help!

Hello to everyone! Can anybody tell me please if I should file a bug for plone.app.multilingual ver.2.0.3 for Plone 4.3.14. The behavior is weird. This is a fresh Out-Of-Box installation.The PAM is not showing translation options at all if installed WITHOUT Archetypes enabled during buildout, and even with Archetypes enabled it still behaves weird. It is not creating the translation of a page and instead it goes to

http://www.localhost:8080/ZeLem/de/portal_factory/Document/document.2017-09-02.0117191520/at_babel_edit and outputs the following errors on trying to create a translation of a page to German as an example Checked this with Plone 4.3.10 and PAM 2.0.0 with same bad results.

Please see also my last comment on Stack-Overflow question:

Here are the errors:

Es ist leider ein Fehler aufgetreten…
Dies ist die vollständige Fehlermeldung: (We’re sorry, but there seems to be an error…)

Zeige Fehlerbericht als Text

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.FactoryTool, line 478, in call
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 91, in call
Module Products.CMFFormController.BaseControllerPageTemplate, line 32, in _call
Module Shared.DC.Scripts.Bindings, line 322, in call
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 237, in _exec
Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
Module Products.PageTemplates.PageTemplate, line 87, in pt_render
Module zope.pagetemplate.pagetemplate, line 132, in pt_render
Warning: Macro expansion failed
Warning: <type 'exceptions.KeyError'>: 'macro'
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 858, in do_defineMacro
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 888, in do_useMacro
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 954, in do_defineSlot
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 858, in do_defineMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 954, in do_defineSlot
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 946, in do_defineSlot
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 858, in do_defineMacro
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 710, in do_insertTranslation
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 652, in do_i18nVariable
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 531, in do_optTag_tal
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 620, in do_insertText_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
URL: file:/home/Mik/PloneT/buildout-cache/eggs/archetypes.multilingual-2.0-py2.7.egg/archetypes/multilingual/skins/archetypesmultilingual/at_babel_edit.cpt
Line 129, Column 33
Expression: <PathExpr standard:u'pamutils/current_language_name'>
Names:
{'container': <PloneSite at /ZeLem>,
'context': <ATDocument at /ZeLem/de/portal_factory/Document/document.2017-09-02.0117191520 used for /ZeLem/de>,
'default': <object object at 0x7f4a53b5e570>,
'here': <ATDocument at /ZeLem/de/portal_factory/Document/document.2017-09-02.0117191520 used for /ZeLem/de>,
'loop': {},
'nothing': None,
'options': {'args': (),
'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x7f4a40c62150>},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f4a40c21578>,
'request': <HTTPRequest, URL=http://www.localhost:8080/ZeLem/de/portal_factory/Document/document.2017-09-02.0117191520/at_babel_edit>,
'root': ,
'template': <FSControllerPageTemplate at /ZeLem/at_babel_edit used for /ZeLem/de/portal_factory/Document/document.2017-09-02.0117191520>,
'traverse_subpath': ,
'user': <PropertiedUser 'admin'>}
Module zope.tales.expressions, line 217, in call
Module Products.PageTemplates.Expressions, line 155, in _eval
Module Products.PageTemplates.Expressions, line 117, in render
Module plone.app.multilingual.browser.utils, line 153, in current_language_name
AttributeError: 'NoneType' object has no attribute 'get'

=============

Also Zope gives the following warning when it starts:

./bin/instance fg

2017-09-02 16:27:44 INFO ZServer HTTP server started at Sat Sep 2 16:27:44 2017
Hostname: 0.0.0.0
Port: 8080
2017-09-02 16:27:56 WARNING plone.behavior Specifying 'for' in behavior 'Multilingual Support' if no 'factory' is given has no effect and is superfluous.
2017-09-02 16:27:56 INFO Plone OpenID system packages not installed, OpenID support not available
2017-09-02 16:28:02 INFO Zope Ready to handle requests

Not sure about Plone 4, but there are two profiles you can install: One for Dexterity and one for Arcehtype.
You might also have to enable 'Multilingual Support' behaviour.

Hello thanks for the reply. I installed P.A.M with both profiles enabled.
"Multilingual Support" behavior is enabled in "Behavior settings" of "Language Root Folder" of "Dexterity Content Types" .

You need to enable it for your content types, too

Hello and thank you very much! But I would like to understand something here. See I am quite new still to Plone . Do you mean I need to enable it for my custom content types as well? Well there are none yet ! This is a fresh install. Or do you mean I need to enable the M.behavior in some other place as well? What do I need to do to translate a simple page or folder or anything that already exist there as a content type? May be I missed something here! Would you please explain ...Thank you!
I apologize if it`s gonna take a few moments to do.

When you have content in Plone (for example a 'Page' or a 'News Items' or 'YourCustomContentType' they are not translatable by default.

To enable translation for all 'Pages' , you will have to enable 'Multilingual Behavior' in the control panel'

In other words, enable it here:

http://yoursite.com/dexterity-types/Document/@@behaviors

( or http://localhost:8080/Plone/dexterity-types/Document/@@behaviors )

If you want other content to be translatable, do the same with them (In practice, you should probably enable it for all content types)

Well LRF is multilingually enabled .Is't any new content item that is created within the language root folder is automatically multilingually enabled if LRF is enabled? Or should I enable the every new page manually?
Well if so then it seems to me that newly created document is not correctly reported to dexterity system .Like it doesn`t recognize new content. And Babel-View of LRF is not working either WITHOUT archetypes.multilingual installed. The following link shows what I get when trying to access behaviors as you mentioned and the behaviors of the new page named "Declaration of Principles" by going here : (After logging in)
localhost:8080/ZeLem/dexterity-types/Document/@@behaviors
localhost:8080/ZeLem/en/dexterity-types/declaration-of-principles/@@behaviors


"This page does not seem to exist…"

but the page itself is accessible here:

localhost:8080/ZeLem/en/declaration-of-principles

and @@behaviors are not accessible for the page

And http://localhost:8080/ZeLem/dexterity-types/LRF/@@behaviors

is accessible and Multilingually enabled.

Also the "document" option and this new page are not appearing in "Dexterity content types" tweaking option of the Site Setup. There are only two items there LRF and Media folder.
No matter what type of content I create nothing adds up IN THAT LIST!

So the new items are not translatable as with errors mentioned earlier in this discussion.
Thanks for patience! Any thoughts please?

These are my personal views:

  • It looks like you are using Plone 4 with Archetype, I though you wanted to use Dexterity
  • With Plone 4 and Archetype, I would consider Linguaplone, which has some features that I find missing in p.a.multilingual.
  • If you want to use p.a.multilinugal, I would either migrate from Archetype to Dexterity, or you should only install the Archetype profile.
  • If you use Dexterity, you will need to enable the behaviour on each content type that you want to be translatable.
  • With Archetype no behaviour should be enabled

Sorry my friend i think something may be misunderstood here. The PAM is automatically configured with dexterity as by instruction manual- (https://pypi.python.org/pypi/plone.app.multilingual/2.0.0)
So I installed it. But I also installed an add-on "archetypes.multilingual" because this Dexterity thing wasn't working from the start right after the site installation from unified installer, as I mentioned it in the beginning of the thread. After activating that archetypes.multilingual add-on I am able only to see the Babel View of the translatable page. But I am not able to create the translation from it and get the errors that are in the beginning of the thread. I can only add existing translation. But again I am trying to use only dexterity first and things don't work as they supposed to. Neither with archetypes nor without them. The examples above are only from Dexterity enabled and "multilingual support" is enabled in Language Root Folders and Media folders. No other newly created items seem to be registered with Dexterity system somehow.
At least they don't show up in the "Dexterity Content Types" control panel as in the screenshot
https://www.dropbox.com/s/huz3usbg8ebejii/Screenshot_DexterityP4_Missing_Contenttypes.jpeg?dl=0

Should they be there? I don't know for sure . This is why I am asking here if these things are bugs or I am doing something wrong? So I wanted to use P.A.M because it doesn't have canonical language dominance.

On Plone 4.3, I think you need to install plone.app.contentypes profile to have a Dexterity Document content type. When you have the Document content types listed in Dexterity types, you will be able to enable the PAM behaviour I guess.

Hello, sorry it took me too long to respond to this. But yes that is true! I had to install plone.app.contentypes with buildout for this to work! So there is one problem here that I see.
The need to do the installation is not described anywhere in Plone documentation except the one and single place : the plone.app.contentypes manual pages.At least I didn`t find it anywhere else. So for someone to use the content types he should be directed to that manual at least. But why would he look in there if he does not know he needs that install ??!! So there is a need to inform users in more places, i think.
But meanwhile and despite it working well with dexterity (plone.app.contentypes),PAM for Plone 4.3 still behaves erroneously when used only with archetypes as described at the start of the thread.

Plone Foundation Code of Conduct