-
Notifications
You must be signed in to change notification settings - Fork 638
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]: Link Field broken after update, entry edit pages inaccessible #15850
Comments
It looks like you have a field condition that referenced a relational field, but then its field type was changed to something else. I’ve just made fields’ condition rules more defensive about that possibility for the next Craft 4 and 5 releases. You can test to see if that helps by changing your "craftcms/cms": "5.x-dev as 5.4.6", and then running |
Craft 4.12.6 and 5.4.7 are out with that fix. Thanks for reporting! |
I updated and the pages all work fine now, thank you! Since you said it's about a condition on a field I looked deeper and found the fields that have a condition relating to the changed field. The condition was still listed on the fields with the conditions in the entry type's field's settings. I understand this is much better than the previous version (erroring out). |
@Nellyaa Good point! I just tagged Craft 4.12.6.1 and 5.4.7.1 which improves on that further by just completely ignoring condition rules if they reference an incompatible field type. (They’ll end up getting fully removed from the condition the next time the condition is saved — when you save the entry type in this case.) |
What happened?
Description
I've started developing a Craft website on Craft 5.0-5.2 (unfortunately I can't remember) and then upgraded to Craft 5.4. I used URL fields, which became Link fields after the upgrade. Since the upgrade all backend edit pages of entries using the link field are broken and creating elements with a link field isn't possible anymore.
I've tried nuking the database, expecting a faulty migration. I've changed the link field to something else and back, but the error persists.
The link field is used within card elements in a matrix in my case.
I tried attaching it directly to the entry itself and it doesn't error/crash the edit page, I can even save URLs or phone numbers, but not assets (they get removed when I try to save them - no error showing up though).
Steps to reproduce
Expected behavior
I can edit the entry and work on link fields, saving, deleting, editing etc.
Actual behavior
The error when I try to create an element (via the button) with a link type in it within a matrix block of a new entry page:
All entry edit pages that where created prior to the update and contain a link field now show this error when you try to access them:
Craft CMS version
5.4.6
PHP version
8.2.17
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
CKEditor 4.2.0
Cookies 5.0.0
GeoMate 3.0.0
ImageOptimize 5.0.2
Mix Manifest 2.0.0
SEOmatic 5.1.4
Sprig 3.5.0
The text was updated successfully, but these errors were encountered: