Skip to content

Conversation

@i-just
Copy link
Contributor

@i-just i-just commented May 29, 2025

Description

If you have showFieldHandles turned on, the conditional builder works as expected, but if you have it off and you have more than one field with the same name (but not handle), then you will only be able to see one field in the builder and will effectively be unable to target the other one. This happens in both v4 and v5, though it’s much easier to encounter in v5.

  • clean 4.15.6 install (5.7.8 will work too, and you only need one field created in that case)
  • create two Plain Text fields; one with a name of “plain text” and handle of “plainText”, and the other with a name of “plain text” and handle of “plainText2”
  • create a section (et1) with an entry type that uses a plainText field
  • create a section (et2) with an entry type that uses plainText and plainText2 fields
  • create two entries in the et1 section; one with plainText set to “test 1” and the other to “test 2”
  • create two entries in the et2 section; one with plainText set to “test 1” and plainText2 set to “test 2”, and the other with “test 2” and “test 1” Screenshot 2025-05-29 at 11 13 23
  • on the All Entries index page use the filters - you’ll only see one instance of “plain text” on the list; setting it to “equals” => “test 1” will only return two out of three entries, but the expectation is that all three would be returned based on names (based on what you see); additionally, and more importantly, there’s no way for you to target the other “plain text” field

With this PR, you’ll see both “plain text” fields on the list, and you can use either one.

I know we discussed using tab names to make this clearer, but after playing with it, I think it makes things more complicated. We already show “duplicate” names in the View menu, so hopefully this will feel familiar.

Related issues

#17284

@i-just i-just requested a review from brandonkelly May 29, 2025 10:49
@brandonkelly brandonkelly merged commit 3fa690a into 4.16 May 30, 2025
@brandonkelly brandonkelly deleted the bugfix/17284-field-names-and-conditionals branch May 30, 2025 00:02
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.

3 participants