[5.x]: Field of type "Entries" fails when opened in a modal
What happened?
Description
There is a bug when opening a field of type "Entries" in a modal. Many console error logs are triggered and it's not possible to select the entry.
It works fine if I open the modal in a new tab.
See the example:
Craft CMS version
5.3.3
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
Can you post a screenshot of the JavaScript errors? Hard to read them in the video.
For sure.
That is the console error right after clicking on the button to select the entry.
And these errors in the sequence are probably a consequence of the first one, but if it helps you in any way, they are generated after clicking on some item in the entries menu.
Hm, weird, somehow the menubtn jQuery function has gone missing at that point.
I’m not able to reproduce that locally, but I’m guessing it’s happening because some plugin or module is overriding jQuery on the page.
Try reloading and reproducing with your browser’s Network tab open, and see if you see any requests pulling in a new copy of jQuery are coming down before/when the error occurs.
Well, I tested it on Chrome, Safari and Firefox and didn't find anything significant in the network tab. Not sure if this is relevant, but this problem happens in the Globals menu. I did not test it in an entry, but I can try it as well.
Chrome: https://github.com/user-attachments/assets/a1c27fe5-6808-4043-a939-c7469ffb678a
Firefox: https://github.com/user-attachments/assets/e8d70aef-15a1-4f3e-b3be-8c4dc2d41b9f
Safari: https://github.com/user-attachments/assets/6c5d7041-f386-4609-b4fa-9fd843031273
Just did it, added the same option to another field and tested it in a regular entry. Got the same result. https://github.com/user-attachments/assets/cbb263b6-7804-4ede-8be3-1f641ca52bd6
Here is my field config: https://github.com/user-attachments/assets/585f2b65-b7fc-402e-ac3b-bda611cced7b
Any chance you can send a database backup and your Composer files into [email protected]?