Reverse synchronization, that is moving values from the legacy properties to the replacing fields, happens before saving to ensure that any alteration performed by modules to the properties is not lost.
Currently reverse synchronization happens before saving an entity and (possibly) after saving it to account for the fact that Title has a very low weight and that modules might alter the legacy property after reverse sychronization has happened. This has both performance and reliability implications, AAMOF after saving an entity, straight synchronization might be needed again (for instance see title_tokens_alter()).
We need to implement hook_module_implements() to ensure reverse synchronization happens only before saving but after any other implementation of hook_entity_presave(), which luckily is called after the entity-specifc presave hooks.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | title-rsync-1620986-3.patch | 3.44 KB | plach |
| #1 | title-rsync-1620986-1.patch | 3.23 KB | plach |
Comments
Comment #1
plachHere is a patch: with it Title gains a very high weight but by default hook implementations are moved as first to ensure the current behavior is retained except for reverse synchronization.
Comment #2
plachThis might need tests. Tagging to ensure I don't forget about it.
Comment #3
plachFixed bogus update function.
Comment #4
plachComment #5
plachCommitted and pushed.