Bugfix/18743 link field propagation#18873
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Only show the selected element as disabled in the modal if it’s actually from the same site as the one currently being edited.
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 tonone.Steps to reproduce/test:
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;myMatrixAll), same as above, but with the propagation method set to “Save entries to all sites the owner element is saved in”;before this PR:
myMatrixNoneshows “Link to me (s1)” in the Link field for both sites.myMatrixAllshows “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
myMatrixNonefield, 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