Skip to content

[5.x]: Error: A field layout element has a duplicate UUID when upgrading from craft 4 to craft 5 #16032

@LukeAndrewColeman

Description

@LukeAndrewColeman

What happened?

Description

I have just been trying to upgrade from craft 4 to craft 5, I managed to do this locally without any problems, when i went to push the changes to staging i got this error Error: A field layout element has a duplicate UUID. Reinstall Craft CMS ^4.4.14 and run utils/fix-field-layout-uids before upgrading to Craft CMS 5, this caused the migrations to fail.

I did notice that this got fixed recently in 5.0.3 but i'm still having the issue, i also tried going back to craft 4 and running the suggested command which resulted in no duplicates.

All environments are on the latest craft 4 versions including the plugins.

Expected behavior

Migrations to run and upgrade to craft 5.

Actual behavior

Migrations failed.

Craft CMS version

Staging (4.12.8) Local (5.4.9)

PHP version

Staging (8.2.21) Local (8.2.15)

Operating system and version

Mac OS 15.0.1

Database type and version

Staging (MySQL 28.1) Local (MySQL 8.0.33)

Image driver and version

Staging (Imagick 3.7.0 (ImageMagick 7.1.1-32)) Local (Imagick 3.7.0 (ImageMagick 6.9.11-60))

Installed plugins and versions

Staging
Calendar | 5.0.10
CKEditor | 3.10.0
Element API | 4.1.0
Feed Me | 5.8.2
Formie | 2.1.32
Image Resizer | 3.0.12
Minify | 4.0.1
Navigation | 2.1.1
Neo | 4.2.18
Redactor | 3.1.0
Retour | 4.1.19
Scout | 4.1.1
SEOmatic | 4.1.5
Servd Assets and Helpers | 3.5.19
Table Maker | 4.0.14
Vite | 4.0.10
Wordsmith | 4.5.0

Local
Calendar | 5.0.11
CKEditor | 4.3.1
Element API | 4.1.0
Feed Me | 6.5.0
Formie | 3.0.9
Image Resizer | 4.0.1
Minify | 5.0.0
Navigation | 3.0.5
Neo | 5.2.14
Redactor | 4.2.0
Retour | 5.0.3
Scout | 5.0.1
SEOmatic | 5.1.5
Servd Assets and Helpers | 4.0.8
Table Maker | 5.0.3
Vite | 5.0.1
Wordsmith | 5.0.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions