Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Tried using this module with the workbench moderation module enabled and noticed when ever I edit an existing referenced entity even after saving new changes aren't reflected. Did some digging and discovered this is because the workbench moderation module creates the new saved content as a draft and there is no option from the inline entity edit form to change the moderation state. This would be a nice feature to have.
Comments
Comment #1
John Pitcairn CreditAttribution: John Pitcairn commented>> active (no patch to review)
If Field Collection is anything to go by, support for Workbench Moderation could be difficult.
Ideally a new non-default revision of the referenced entity should be saved if the parent node entity is also saving a new non-published revision. The referenced entity's revision_id should be included, not just the entity id, so you see the difference between published and draft revisions when viewing the parent node.
This gets tricky because Workbench Moderation is a node module - it does not support Entity API's native is_default flag. Workbench Moderation also defers its processing until shutdown, and Field API has already saved the new field revision data as default (published) as a result.
See #1901892: Most recent Field Collection revision always appears in View when using Workbench Moderation and #1807460: Field collection doesn't play nice with workbench moderation (patch)
Comment #1.0
Kristen PolUpdated issue summary.
Comment #2
John Pitcairn CreditAttribution: John Pitcairn commentedAnd this would be a feature request, not a bug.
Comment #3
edutrul CreditAttribution: edutrul as a volunteer and at Anexus commentedI love this! and this needs to be in d8 as well!
Comment #4
edutrul CreditAttribution: edutrul as a volunteer and at Anexus commentedComment #5
darol100 CreditAttribution: darol100 as a volunteer and commented1++ for this feature.
Comment #6
dawehnerFor me this sounds really like #2791139: Allow IEF save revisions nodes bundles to be honest. This patch makes it certainly possible to let those two concepts work together.
Comment #7
darol100 CreditAttribution: darol100 as a volunteer and commented@dawehner I agree with you. Should we close this issue and update the another issue ?
Comment #8
dawehner@darol100
Yeah I believe we can mark this issue as a duplicate of the other one. The other one needs some more testing for example, so in case anyone is interested into that, give it a try.
Comment #9
darol100 CreditAttribution: darol100 as a volunteer and commentedFor anyone looking for a temporary solution. #2816229: Make content_moderation and inline_entity_form play nice
Comment #10
TomTech CreditAttribution: TomTech at Achieve Internet commentedI just had to deal with this issue integrating workbench_moderation, inline_entity_form, and entityreference on D7. The referencd patches are D8.
At least in D7, it seems the main piece missing in the integration is that workbench_moderation injects itself using hook_node_form_alter. But, inline_entity_form doesn't invoke that, since it uses its own node form.
I was able to make this work using the following two hooks. Probably needs to be tested in a greater variety of use cases, but works for what I need right now. I'll create a small integration module if this can't be integrated into workbench_moderation.