[5.x]: Craft 5 upgrade error: A field layout element is missing its UUID
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
Description
Hi @brandonkelly - I'm getting a very similar error to https://github.com/craftcms/cms/issues/16032 when upgrading to Craft 5.
I am upgrading from Craft 4.13.9 to 5.5.9.
The error I'm getting is:
Exception: A field layout element is missing its UUID. Reinstall Craft CMS ^4.4.14 and run `utils/fix-field-layout-uids` before upgrading to Craft CMS 5.
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
- Amazon S3 2.2.1
- Bugsnag 5.0.0
- CKEditor 4.4.0
- Freeform 5.8.6
- Super Table 4.0.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the local and staging upgrade environments, then review the Craft 4 utils/fix-field-layout-uids output and the Craft 5 migration that reports the missing UUID. Done means identifying why staging still contains an invalid field layout and confirming that the Craft 4 to 5 migration completes successfully there.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100