-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.x]: Multiple conditional fields behave peculiarly when the condition of one assesses the state of the other #15104
Comments
Hi, thanks for getting in touch! I’m not able to reproduce this behaviour. Do you see any errors in the console when editing this entry? |
I just retested this on my local following the steps above and it seems like this doesn't happen when you first set it up, but if you populate the URL field, then save it, then refresh the entry, then do steps 13 and 14, that's when the problem happens! Would you be able to test this happens for you as well? |
Thanks for the update. Unfortunately, I’m still not able to replicate this. I take it you don’t see anything in the console when this happens for you? |
Thanks for confirming! Would you be able to send your |
Sure! I'll do that now |
Thanks! The missing piece of the puzzle was that the fields are part of a matrix field which has inline-editable blocks view mode. Looking into it. |
Craft 5.1.8 is out with that fix. Thanks again! |
What happened?
Description
I have created an Entry Type that uses an Entries field and a URL field.
The Entries field is conditionally set to appear only when the URL field is empty.
The URL field is conditionally set to appear only when the Entries field is empty.
Both fields are visible to begin with (as expected, as both are empty at this point)
When I populate the URL field, the Entries field disappears (as expected)
When I remove the content from the URL field, the Entries field reappears (as expected)
When I select an Entry from the Entries field, the Entries field disappears and the URL field reappears with the content it had before I removed the content from it.
If I refresh the page, neither of the fields are visible (presumably because the state of both is 'has a value' and the fields are both set to appear only when the other has a state of 'is empty')
Steps to reproduce
Expected Behaviour
When you press "Select", a small representation of the entry you chose should appear under the heading for your Entries field, and the URL field should not be visible
Actual Behaviour
When you press "Select", the Entries field disappears and is replaced by the URL field that has repopulated itself with whatever you populated it with previously (e.g https://www.google.ie/).
If you refresh the page and scroll to where your field was, you should no longer be able to see the Entries field nor the URL field.
Craft CMS version
Craft CMS Pro 5.1.7
PHP version
8.2.0
Operating system and version
MacOS Sonoma 14.5
Database type and version
PostgreSQL 15.8
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: