Hello,

I'm using State Flow for a project, I encountered this problem when I'm editing a form of a revision if there's already a published revision of my node.
After some research I figured out that this bug come from the implement of hook_node_update() on the state_flow.module file.

The state_flow_prevent_live_revision is saving the current published version of the node using node_save, this node_save will invoke the node_update hooks. At that time the new revision's fields are not saved yet. this causing a warnings and a new revision without fields attached to it.

To solve this problem I choosed to implement the hook_entity_update instead and then test the type. This solve the problem because hook_entity_update is called after the hook_node_update so at that time the fields are well written in the database.

I attached my patch with this issue. I'm still new to Drupal and I'm not sure if this is the best way to fix this bug but it actually worked for me.

Thank you for your work :)

Comments

rydje’s picture

StatusFileSize
new471 bytes
rydje’s picture

StatusFileSize
new455 bytes

Sorry, I reattach the good patch.

fmitchell’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Can you provide the steps to reproduce? I'm able to edit revisions of a published node without any issue.

bojanz’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)