Repository navigation
[6.x] Make field ids unique across publish containers - #15682
Merged
jasonvarga merged 1 commit intoOct 20, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
It's fine. Field ids are used for wiring up labels to their controls. They aren't intended to be used as hooks for styling/js/etc. |
Closed
4 tasks done
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.
When a field lives inside a Bard or Replicator set, its settings open in a stack on top of the parent field's settings. Both stacks render fields with the same ids (
field_instructions_position_1,field_sortable, ...), so clicking a label in the inner stack activates the hidden control in the outer one. Picking "Below" for Instructions Position silently changes the parent Bard field instead of the set field.This adds the publish container's name to the field id so ids stay unique across stacked containers. Entry forms now render
field_base_titleinstead offield_title, so anything selecting fields by the old id format would need updating.15522-before.mp4
15522-after.mp4
@jasonvarga heads-up on that: this changes the DOM id of every field in the CP. Nothing in core relies on the old format, but addons or site browser tests that select fields like
#field_titlewould break. Do you think that's okay, or would you rather keep the old ids on the main form and only namespace nested containers?Fixes #15522
🤖 Generated with Claude Code