Skip to content

Bugfix/18743 link field propagation#18873

Merged
brandonkelly merged 7 commits into
5.xfrom
bugfix/18743-link-field-propagation
May 14, 2026
Merged

Bugfix/18743 link field propagation#18873
brandonkelly merged 7 commits into
5.xfrom
bugfix/18743-link-field-propagation

Conversation

@i-just
Copy link
Copy Markdown
Contributor

@i-just i-just commented May 14, 2026

Description

  1. Only show the selected element as disabled in the modal if it’s actually from the same site as the one currently being edited.

  2. Adjust the Link’s normalizeValue() value to account for the Link field being nested in an entry that belongs to a field (e.g. matrix) with propagation method set to none.

Steps to reproduce/test:

  1. clean 5.10.0 installation with 2 sites;
  2. create a Link field with translation method set to “Translate for each site”;
  3. create a Matrix field (myMatrixNone) with propagation method set to “Only save entries to the site they were created in”; add an entry type that contains the Link field from step 2; it’s easiest to test with view mode: blocks;
  4. create another Matrix field (myMatrixAll), same as above, but with the propagation method set to “Save entries to all sites the owner element is saved in”;
  5. create a section, enabled for both sites, propagation method set to “Save entries to all sites enabled for this section”, with an entry type that contains the matrix fields from steps 3 and 4;
  6. create an entry with a title of “Link to me (s1)” and fully save; then edit for the second site and adjust the title to “Link to me (s2)”;
  7. ensure you’re on the first site;
  8. create an entry in that section, add one matrix block to each field, select the entry from the previous step (in both) and fully save;

before this PR:
myMatrixNone shows “Link to me (s1)” in the Link field for both sites.
myMatrixAll shows “Link to me (s1)” for the first site and “Link to me (s2)” for the second site.

after this PR:
If you repeat steps 7 & 8, both fields show “Link to me (s1)” for the first site and “Link to me (s2)” for the second site.

In order to test the first point above (disabled elements in the modal), you’ll have to edit one of the existing entries, remove the value from the myMatrixNone field, and add a new one, ensuring it’s from the other site. Fully save and edit the entry again. If you now press “Replace”, you’ll be able to select the “Link to me” from the same site as the entry you're editing, but not from the other.

Related issues

#18743

@i-just i-just requested a review from brandonkelly May 14, 2026 12:27
@brandonkelly brandonkelly merged commit 8e980a5 into 5.x May 14, 2026
3 checks passed
@brandonkelly brandonkelly deleted the bugfix/18743-link-field-propagation branch May 14, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants