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
Comment #1
bahbka commentedHi! here is my workaround: setup proper name in drupal_static function call.
Comment #2
bahbka commentedComment #4
shenzhuxi commentedCommitted. Thanks.