At the moment I can see 2 separate problems with the UUID implementation when making a uuid entity local, but both relate to the same thing - revisions. We effectively explicitly require the uuid based entity to have revision=TRUE set on it for it to support revisions properly, and this may not be practical. Secondly there is a really specific integration point added for node in the entity_make_entity_local function that where a revision VUUID is specified for node we load the last revision for the node, in a situation where the node type is not setting revisions by default - we end up overwriting the last revision, which also feels wrong.

I'd propose the following:

  • Remove the revision load for node from the function
  • At the point where the revision uuid is looked up (and not found, but we've already established the entity is revisioned) we should be flagging it as a new entity revision.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dan.munn created an issue. See original summary.

dan.munn’s picture

So as per description removed a collection of node specific UUID implementation as it is covered by the changes proposed, one key change not highlighted above, I've changed the unset of the revision identifier property, to instead make it false - this still executes okay vs the suite of tests locally.