Ticket #13385 (confirmed Bug)

Opened 3 years ago

Last modified 3 years ago

State-mapping doesn't work in multilingual sites

Reported by: ida Owned by:
Priority: minor Milestone: 4.x
Component: Backend (Python) Version: 4.2
Keywords: workflow, linguaplone, patch Cc:

Description (last modified by ida) (diff)

When changing the workflow in a multilingual site, the state-mapping of the current language works fine, yet the mapping in the other languages will fail and set all items to the initial state of the new workflow.

Additionally the linking via language-selector breaks.

Steps to reproduce:

  • Create a site with LinguaPlone installed, choose two languages, translate front-page into the other language to have at least one item in each language.
  • Go to types-controlpanel, change the workflow from simple_workflow to intranet_workflow, map states, apply changes.

Martijn Pieters suggested a patch on  http://stackoverflow.com/questions/13901739/changing-workflow-in-multilingual-site-works-only-for-one-language which works fine:

In plone/app/workflow/remap.py line 79 change

for brain in portal_catalog(portal_type=type_ids):

to

for brain in portal_catalog(portal_type=type_ids, Language='all'):

Change History

comment:1 Changed 3 years ago by ida

  • Description modified (diff)

comment:2 Changed 3 years ago by mj

  • Keywords workflow;linguaplone added; workflowlinguaplone removed
  • Component changed from Unknown to Backend (Python)

comment:3 Changed 3 years ago by kleist

  • Status changed from new to confirmed

Isn't this rather a bug in Linguaplone than in Plone, and should be reported in the Linguaplone tracker  http://plone.org/products/linguaplone/issues ?

comment:4 Changed 3 years ago by ida

  • Description modified (diff)

comment:5 Changed 3 years ago by ida

@kleist: good question, the core considers often, that LinguaPlone is installed, f.e. here:  https://github.com/plone/Products.CMFPlone/commit/f0ccb6f9d8979bba5c5ca5af3dce46256c221e3d

I'd say it depends on the effort that would have to be done LinguaPlone-sidewise compared to this rather easy patch and it's a safe bet, considering other possible mullingual solutions.

I think the workflow-package needs to consider that multiple langs may be available, not the other way round, LinguaPlone considering a workflow-changement.

Any other opinions?

comment:6 Changed 3 years ago by kleist

  • Keywords workflow, linguaplone, patch added; workflow;linguaplone removed

comment:7 Changed 3 years ago by mj

Replying to kleist:

Isn't this rather a bug in Linguaplone than in Plone, and should be reported in the Linguaplone tracker  http://plone.org/products/linguaplone/issues ?

This is not something that LP could easily patch around. Note that Products.CMFPlone.WorkflowTool, plone.app.linkintegrity and plone.app.layout already take LP into account by adding Language='all' to queries.

Last edited 3 years ago by mj (previous) (diff)
Note: See TracTickets for help on using tickets.