I have really weird behavior if I want to translate text like Archetype (e.g. Folder ) using plone.app.multilingual.
Msg error:
Insufficient Privileges You do not have sufficient privileges to view this page. If you believe you are receiving this message in error, contact the site administration.
My environment:
- Plone = 4.3.2
- plone.app.multilingual = 1.2.1
- plone.multilingual = 1.2.1
- plone.multilingualbehavior = 1.2
- archetypes.multilingual = 1.2
- And about 40 Plone Addon ( which makes it really complicated )
My use case:
- Bilingual configured EN and DE
- Configures Plone simple_publication_workflow.
- All elements are in a closed state. (LanguageRoot folders are also locked)
I can reproduce this problem by first creating the content (Folder) in the English part of the site. Content is private because this is the default state for new content.
Then I try to translate the contents into German by clicking the Translation menu β create German . Done ... Insufficient Privileges error appears.
If I install vanilla Plone 4.3.2 and plone.app.multilingial without my huge pile of add-ons, everything will be fine. I am pretty sure that there is a problem with one of the add-ons, but I need to understand what leads to this problem. It doesn't matter which addon crashes the site.
Further...
Since this is a resolution issue, I first tried publishing everything and then translating the content into German. It worked out well!
Well, the next step is debugging in plone.app.multilingual. I ended up in add.py AddTraverser
The problem occurs when redirecting to line 37 . If one part of the URL is not publicly available (anonymous?), An error occurs.
IMHO, it is strange that the implementation of the DX part and the AT part is different.
I changed the implementation of the AT part to:
self.context.REQUEST.set('type', name) view = queryMultiAdapter((self.context, self.context.REQUEST), name="add_at_translation") return view.__of__(self.context)
instead:
baseUrl = self.context.absolute_url() url = '%s/@@add_at_translation?type=%s' % (baseUrl, name) return self.request.response.redirect(url)
This completely fixed my case. And all the plone.app.multilingual tests still work.
But I canβt explain why? And why does this not work without customization?
Any tips really appreciated!