New revisions created even if data is unchanged, and this prevents ability to check for changed fields in $node->original

Created on 16 July 2024, 5 months ago

Upon save with no data change, all Entity Reference Revisions data is assigned a new target_revision_id. Therefore the data is just duplicated and assigned a new ID. Not only is this bad for database size, but it is not possible to check what data has changed.

If for example using hook_entity_presave() to check the original entity data against the submitted data, so we can undertake processing based on changed data, it shows all entity reference revisions as changed even though they have not been.

This is causing serious issues when it is a requirement to do some processing depending on what fields have changed.

💬 Support request
Status

Active

Version

1.11

Component

Code

Created by

🇬🇧United Kingdom amityweb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024