Links are verified even when they shouldn't, slowing down every edit

Created on 18 January 2025, about 1 month ago

Problem/Motivation

I noticed that even after disabling the verification from the field formatter, when saving an entity with a link field set to use the formatter, the saving will be very slow. It seems like the links are verified anyway, every time the field values are changed.

Proposed resolution

Could lines 291 and 465 of src/Plugin/Field/FieldFormatter/DecoratedLinksFormatter.php be the problem?

It seems like the viewElements function (which I guess is always called automatically - I'm not a dev) will always call the decorate function with the true flag, which will in turn call the verify function right before returning the verified property of the link.

I guess setting a verified variable = $settings['verify'] before line 291 and changing the call to use that instead of TRUE would fix?

🙏🏻

A long term improvement, ie. not a bug fix but feature request, would instead allow setting verification jobs to run in the background.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

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

Comments & Activities

  • Issue created by @kopeboy
  • 🇮🇹Italy kopeboy Milan

    I even tried disabling verification on each link decorator setting, without success, but I guess the field formatter setting should override the setting at each decorator, right?

Production build 0.71.5 2024