Changing link title configuration leads to displaying old values

Created on 19 August 2020, over 4 years ago
Updated 10 July 2023, over 1 year ago

Problem/Motivation

If the Allow link text setting of a link field is changed from Optional/Required to Disabled after content has been saved, when the content is edited again the title won't be reset to NULL and the content will then display the old title value.

Steps to reproduce

  • Add a field link to the content type article with the setting Required for Allow link text
  • Create a content and put a URL/Title in this link e.g. : https://www.drupal.org/8 โ†’ / About Drupal 8
  • Save and view the content, you will see <a href="https://www.drupal.org/8">About Drupal 8</a>
  • Change the configuration of the link field to set the title as Disabled
  • Edit your content and replace the URL by https://www.drupal.org/about/9 โ†’
  • Save and view the content, you will see <a href="https://www.drupal.org/about/9">About Drupal 8</a> (new URL with old title) instead of <a href="https://www.drupal.org/about/9">https://www.drupal.org/about/9</a>

So the old title is kept and isn't editable anymore by the end user unless the administrator changes back the link field settting.

Proposed resolution

Reset the link title value if the setting is Disabled

Remaining tasks


Review
Commit

User interface changes

Link title uses current correct value.

API changes

N/A

Data model changes

N/A

Release notes snippet

๐Ÿ› Bug report
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Linkย  โ†’

Last updated 11 days ago

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance tostinni

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024