Closed (fixed)
Project:
Linkit
Version:
7.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2025 at 20:13 UTC
Updated:
6 Nov 2025 at 20:19 UTC
Jump to comment: Most recent
Code changes in #3538856: Field widget broken if there's multiple link fields, one without link text enabled failed to scope when to apply the "Automatically populate link text from entity label" configuration option properly by removing code that looked for data-linkit-widget-title-autofill-enabled.
As a result, all Link fields on sites using 7.0.8 or later receive the automatic population behavior regardless of configuration.
diff --git a/js/linkit.autocomplete.js b/js/linkit.autocomplete.js
index e790077..9fd28cc 100644
--- a/js/linkit.autocomplete.js
+++ b/js/linkit.autocomplete.js
@@ -76,7 +76,7 @@
const linkSelector = event.target.getAttribute('data-drupal-selector');
if (linkSelector && linkSelector.endsWith('-uri')) {
const titleSelector = linkSelector.slice(0, -4) + '-title';
- const $linkTitle = $(`[data-drupal-selector="${titleSelector}"]`, $context);
+ const $linkTitle = $(`[data-linkit-widget-title-autofill-enabled][data-drupal-selector="${titleSelector}"]`, $context);
// Don't overwrite an existing label unless we already replaced it
// before.
if ($linkTitle.length > 0 && (!$linkTitle.val() || $linkTitle.hasClass('link-widget-title--auto'))) {
Comments
Comment #3
mark_fullmer