I have a fresh Plone-4.1.5-site with Linguaplone-4.1.1 installed, two languages selected and the front-page translated into the other language.
When changing the workflow from simple_workflow to intranet_workflow via the controlpanel, and mapping old states to new ones, it occurs, that only objects of the current chosen language get the new mapping. Objects of the other language get the initial state of the new workflow.
Is it possible to do the mapping programatically to overcome this?
In this case, it'll probably be simplest to just patch the code that remaps the workflows.
Open the
plone.app.workflowegg (it's path will be listed in yourbin/instancescript), find theplone/app/workflow/remap.pyfile and edit it.About halfway down you'll find the following line (line 79 in my copy):
and add
Language='all'to that:The alternative is copying that whole file into your own project, make that change locally, then calling it with:
The
remap_workflowscript then uses the current state of the object to find the new state it should have in the new target workflow(s) (it'll do this for each new workflow); if the old state is not listed in the map it'll use the initial state of the target workflow.