Working to schedule a node to programmatically move from draft to publish, doing like so:

$node = Node::load(3061);
//$node->set('moderation_state', "published");
//$node->save();

tends to just set the moderation state to published for the current published revision. Any insight into how to specifically identify the latest revision and publish that?

Comments

kevinwal created an issue.

sandyjain’s picture

HI,

I am also looking for the same.
Can anybody help here?

Thanks in advance.

jmtew58’s picture

I am trying to make a 'bulk publish' function and also have need for this.

Thank you in advance!