Hi,

I needed two different workflows for different content types, so I created the following two :

Workflow 1 :
- (creation)
- needs review
- published
- unpublished

Workflow 2 :
- (creation)
- needs review
- published

My issue is that it doesn't want to revert completely the workflow. This issue comes from the _og_workflow_update_transitions() function, and in particulary this piece of code :

if (empty($cached['sidmap'][$transition[$state]])) {

Since I use the same name for states for each workflows, it only takes the Workflow 1's states.

One way to solve this issue is to take account of the wid, like this :

if (empty($cached['sidmap'][$dbworkflow->wid][$transition[$state]])) {

and change any occurence of $cached['sidmap'][$transition[$state]] by empty($cached['sidmap'][$dbworkflow->wid][$transition[$state]].

Comments

bahbka’s picture

Hi! here is my workaround: setup proper name in drupal_static function call.

bahbka’s picture

Status: Active » Needs review

  • shenzhuxi committed 77be92c on 7.x-2.x authored by BAHbKA
    Issue #2318933 by BAHbKA: Features revert with multiple workflows
    
shenzhuxi’s picture

Assigned: Unassigned » shenzhuxi
Status: Needs review » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.