Set syncing when updating reference fields

Created on 16 March 2023, over 1 year ago
Updated 12 April 2023, over 1 year ago

Problem/Motivation

When reference fields are updated the parent entity is saved and thus the changed timestamp is updated. When https://www.drupal.org/node/2329253 β†’ is committed entities implementing SynchronizableInterface can use the $entity->setSyncing(TRUE) method to prevent updating things like the changed timestamp.

Steps to reproduce

Observe the changed timestamp updating on an entity with the drush radioactivity:fix-references command.

Proposed resolution

Check if the entity implements SynchronizableInterface and call $entity->setSyncing(TRUE) before saving.

πŸ› Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States robphillips

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

Comments & Activities

Production build 0.71.5 2024