Questions tagged «workbench»

2
以编程方式将工作台状态从草稿更改为已发布
我想进行批量操作并将节点从“草稿”状态更改为“已发布”。我根据先前的更改创建了一个新修订,但是所有修订默认为“草稿”。现在,我想基本上只是发布新修订版。(我正在使用工作台模块。) 我已经尝试过执行以下操作,但是似乎都没有用: $node->workbench_moderation['current']->published = "1"; 要么 $node->workbench_moderation['current']->from_state = "draft"; $node->workbench_moderation['current']->state = "published"; $node->workbench_moderation['current']->published = "1"; $node->workbench_moderation['published']->from_state = "draft"; $node->workbench_moderation['published']->state = "published"; $node->workbench_moderation['published']->published = "1"; $node->workbench_moderation['my_revision']->from_state = "draft"; $node->workbench_moderation['my_revision']->state = "published"; $node->workbench_moderation['my_revision']->published = "1"; $node->workbench_moderation['my_revision']->current = TRUE; 要么 workbench_moderation_moderate($node, 'published'); 我尝试使用以下内容而不是保存内容node_save,以为可能node_save触发了新草案。 workbench_moderation_node_update($node); 我只想简单地加载节点,发布草稿,然后再次保存。 知道我在做什么错吗?
8 workbench 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.