Problem/Motivation
In rare cases, it's possible for a node_save() of a new node or node revision to be rolled back during the course of a single page request (via db_transaction()->rollback()
)... In such cases, the node will no longer exist in the database, but will still exist in PHP variables or static cache. When we hit Workbench Moderation's shutdown function, the node will be passed through, but when it attempts to load the live revision, it will be unable to do so... It stumbles through some PHP notices (creating default object), before attempting to save a half-formed node and dies on an uncaught exception.
Proposed resolution
Workbench moderation just needs a little bit of sanity checking in its shutdown function to catch this rare situation.
Comment | File | Size | Author |
---|---|---|---|
#2 | workbench_moderation-transaction_rollback_shutdown_sanity-2664018-2.patch | 936 bytes | iamEAP |
Comments
Comment #2
iamEAP CreditAttribution: iamEAP commentedHere's a patch.
Comment #3
iamEAP CreditAttribution: iamEAP commented