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.
For fields like Field Collection that define an entity, support revisions via Entity API, and need to save their own entity when the host node is saved, there is no way to determine whether the host node is the default revision (published revision) at $entity->save() time without explicitly calling workbench_moderation_* functions.
This very simple two-line patch sets a $node->default_revision property, so an embedded revisionable entity calling entity_revision_is_default() on its host node gets the correct value, allowing it to determine how to save its entity revision.
Comment | File | Size | Author |
---|---|---|---|
#1 | workbench_moderation-entity-default-revision-property-1989610-1.patch | 1.26 KB | John Pitcairn |
Comments
Comment #1
John Pitcairn CreditAttribution: John Pitcairn commentedPatch...
Comment #2
John Pitcairn CreditAttribution: John Pitcairn commentedSetting status
Where I'm going with this: support for Field Collections - see #1901892: Most recent Field Collection revision always appears in View when using Workbench Moderation
Comment #3
John Pitcairn CreditAttribution: John Pitcairn commentedNope, forget about this, don't need it. See the issue linked in #2.
Comment #4
dealancer CreditAttribution: dealancer commentedLooks like there are related issues:
https://drupal.org/node/2125017
https://drupal.org/node/2274953