-
Notifications
You must be signed in to change notification settings - Fork 641
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]: Craft 5 upgrade error: A field layout element is missing its UUID #16411
Comments
We are experiencing the same problem. The upgrade worked locally but failed when pushed to the staging environment with the same error as @petehjfd. The error seems to come from m230511_215903_content_refactor.php migration script (row 37). So we decided to dump more information to the exception thrown there: There we see that there is a mismatch in the information in the migration compared to the one in the project config file. The migration says there is no UID on the custom field in the layout, and the UID is missing in the array in the migration, but if we look at the file in the project config directory, the UID is there. This is the data in the project.yaml This is the data in the migration where it seems to have lost the UID somewhere along the way: I hope this helps with debugging since we are also stuck here at the moment. |
Update from our perspective: Our problem seems to be that we haven't pushed the commit with the project config changes from the Since the update script from m230511_215903_content_refactor.php uses the values from the database, not from the project yaml files, it resulted in our error above. Running the Sorry @petehjfd for hijacking your thread in case this won't help you. |
Thanks @ragnarfrosti When you run It doesn't for us, so there wouldn't be any project config changes to actually push to staging. Thanks |
Hi @petehjfd Yes, the script found a couple of fields missing the uid, and therefore, the upgrade failed for us. Did you run the |
@ragnarfrosti We are running |
I've found a solution to our problem. I rolled back to Craft 4 and ran the latest Craft 4 updates. I then ran So I think the upgrade guide should perhaps suggest deploying to all servers immediately after rebuilding the project config and before the Craft 5 upgrade to avoid this issue. |
What happened?
Description
Hi @brandonkelly - I'm getting a very similar error to #16032 when upgrading to Craft 5.
I am upgrading from Craft 4.13.9 to 5.5.9.
The error I'm getting is:
I only get this error when deploying the upgrade to the staging server. The upgrade works fine on local.
I rolled back to Craft 4 and ran
utils/fix-field-layout-uids
but it output that there was nothing to fix. I continued on with the Craft 5 upgrade for a second try and got the same error.Expected behavior
Migrations to run and upgrade to craft 5.
Actual behavior
Migration fails with above error
Craft CMS version
Upgrading 4.13.9 to 5.5.9
PHP version
8.3.14
Operating system and version
Linux 6.8.0-44-generic
Database type and version
MySQL 8.0.40
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.12-98)
Installed plugins and versions
The text was updated successfully, but these errors were encountered: