Essentially what is happening if a published node gets deleted before the shutdown function workbench_moderation_store
is processed, then an exception gets thrown and kills the entire process.
I encountered this when following along here http://www.webomelette.com/content-fixtures-behat-testing-drupal-7. What is happening for me is fixture data is getting loaded and rolled back many times during the process. Some of my tests result in nodes being left in the published state before being rolled back, so these nodes cause the exception to be thrown in the shutdown function after calling workbench_moderation_node_live_load
and trying to operate on the boolean false variable (since the original node was deleted but the cloned node persisted).
As far as I can tell, the workbench records are kept clean after the node was deleted, so, simply checking if an actual node was loaded and returned here should be sufficient.
Comment | File | Size | Author |
---|---|---|---|
#4 | node-deleted-before-shutdown-function-2645622-4.patch | 831 bytes | lpeabody |
#2 | node-deleted-before-shutdown-function-2645622-1.patch | 831 bytes | lpeabody |
Comments
Comment #2
lpeabody CreditAttribution: lpeabody at Genuine commentedPatch with fix and comments attached.
Comment #3
nicrodgersI ran in to this issue as well. It was fixed with https://www.drupal.org/commitlog/commit/18554/614b29915cf1eafad4372eafec... from the issue here https://www.drupal.org/node/1919706 but then subsequently broken again by https://www.drupal.org/commitlog/commit/18554/928518e37a756a91d88e8bbaee... from https://www.drupal.org/node/1436260 - due to the re-roll.
The patch in #2 successfully applies to the latest 7.x-1.x-dev and fixes the issue for me, thanks!
Just a tiny little nitpick:
Needs re-wrapping to maximise what's included within the 80-char limit.
Comment #4
lpeabody CreditAttribution: lpeabody at Genuine commentedRe-rolled to maximize words within 80-character limit.
@nicrodgers glad the patch worked out for you. I'll take a look at the other issues you brought up as well.
Comment #5
nicrodgersGreat stuff, top man!