Hi, updating WBM from 7.x-1 to current 7.x-3 broke some of my custom modules. I need to change the state of all translation whenever I change a source from "needs modification" to "published".
All translations should be automatically set to "needs modification" after the source changed.
In WBM 7.x-1 I used this code to create the new node revisions with the new state (a formerly published translation still should be published - but there should be a new WBM revision with state "needs modification")
$ModNode = node_load($translation->nid);
// workbench_moderation_moderate($ModNode, "needs_modification");
$ModNode->revision = 1;
$ModNode->log = $node->log;
$ModNode->workbench_moderation_state_new = "needs_modification";
node_save($ModNode);
Using the same code now in WBM 7.x-3 the translations are still published and the PUBLISHED revision gets some workbench transistion information (like
From Needs to be translated --> Needs modification on 03/23/2017 - 17:13 by admin
)
But no new revision is created and set to current. What to do to upgrade my custom code? Thanx for some hints!!
Comments