node_save() calls node_load() which can populate the node object with stale data that was about to be changed.

For example, I have a custom node type with a form select box. If I deselect all values and submit the form, node_load() will re-populate it before my node update hook can save the empty set.

If node revisions needs to make a call to node_load(), it should probably happen after all the hooks have run, but I'll defer to Gerhard on that.

This bug shows me how important having a clean node workflow is.

Comments

dopry’s picture

Status: Active » Fixed

It doesn't look like this is a problem anymore...
It looks like node_load is called to create node_current, then all of the fields of $node are written over the stale data.

.darrel.

Anonymous’s picture

Status: Fixed » Closed (fixed)