Skip LinkyReplacerEntityOperations::entityPreSave if entity is syncing

Created on 22 July 2024, about 2 months ago

Problem/Motivation

When running a post update hook I noticed some entity revisions had the wrong changed date if they had a link in the body field. I was able to track this down to \Drupal\linkyreplacer\LinkyReplacerEntityOperations::entityPreSave calling LinkyReplacerLinkReplacerInterface::replaceHrefWithLinky.

Steps to reproduce

Proposed resolution

Add this to LinkyReplacerEntityOperations::entityPreSave:

if ($entity instanceof SynchronizableInterface && $entity->isSyncing()) {
  return;
}

Remaining tasks

Do it

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇦🇺Australia mstrelan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024