We have a use case where we are using Deploy to send content from a master site to other microsites. Unlike a typical setup, the child sites are sometimes updated independently of the master resulting in some UUID logic getting mixed up. The most common issue is that a UUID for a node won't match up for the current version, but there is a revision that matches which causes everything to get mucked up.

Please review the patch I'm submitting as any comments are much appreciated. I've tried to add comments in the code explaining the whys.

Comments

mrmikedewolf created an issue. See original summary.

mrmikedewolf’s picture

mrmikedewolf’s picture

StatusFileSize
new2.51 KB

Rereolling due to logic mistake.

mrmikedewolf’s picture

StatusFileSize
new3.28 KB

Re-rolling to be more clean and logically sound.

mrmikedewolf’s picture

StatusFileSize
new3.08 KB

I made a mistake in setting UUID and VUUID to the values in the database. These need to be set to the values coming in from outside.

Corrected the patch.

mrmikedewolf’s picture

StatusFileSize
new3.82 KB

Turns out we need one more addition in order to pull this off.

File fields, oddly, go to greater lengths than any other field to try to preserve UID on themselves. No other field does this in any uuid_field_presave hooks.

This one odd eccentricity makes the logic in entity_property_uuid_to_id() nearly impossible to keep together.

I've removed any attempt of file fields to correct UID. Perhaps this should be re-implemented in an alternative way.