Problem/Motivation
In order for Workbench Moderation to save a forward revision (i.e. a draft revision newer than the published revision), it must trigger node_save() twice—first to save the new revision and then again to set the node table entry back to the previously published revision. The second save requires that $entity->revision be set to 0, so yet another revision isn't created. Unfortunately, this triggers paragraph_field_update() to delete paragraph revisions.
Proposed resolution
The attached patch checks to see if $entity->workbench_moderation['updating_live_revision'] has been set and, if so, it skips the rest of the function. This is identical to the patch that was committed to Field Collection to solve the same problem.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Original report by @jstoller
Is Paragraphs being developed with revision support in mind? More specifically, is compatibility with content moderation modules, like Workbench Moderation, a goal of this module? I ask because Field Collections has had some issues with this in the past and I understand this module is heavily based on that one.
I'm hoping to use Paragraphs on a very large site (and several smaller ones), but content moderation is a must-have feature for us.
Comment | File | Size | Author |
---|---|---|---|
#3 | paragraphs_with_workbench_moderation-2244789-3.patch | 849 bytes | jstoller |
Comments
Comment #1
jeroen.b CreditAttribution: jeroen.b commentedParagraphs has revision support. It does not have content moderation support per paragraph item, but it will work fine with Workbench Moderation.
Comment #2
jstollerThat's fabulous! I actually think per bundle content moderation on paragraphs seems like overkill and a little counter productive, but node based moderation is a necessity.
Comment #3
jstollerChanged to bug report, added related issue and uploaded patch.
Comment #5
jeroen.b CreditAttribution: jeroen.b commentedPushed, I'll push out a new version soon after I checked #2138767.
Comment #6
jstollerThanks for committing it so quickly! I'll mark this one fixed.