Skip to content
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]: migration from 4 to 5 exception at entrify_matrix_blocks #16383

Open
maknapp opened this issue Jan 3, 2025 · 4 comments
Open

[5.x]: migration from 4 to 5 exception at entrify_matrix_blocks #16383

maknapp opened this issue Jan 3, 2025 · 4 comments
Labels

Comments

@maknapp
Copy link

maknapp commented Jan 3, 2025

What happened?

Description

I am migrating from 4.13.8 to 5.5.8 (with postgresql).

Exception: Attempt to assign property "type" on null (/var/www/craft/vendor/craftcms/cms/src/migrations/m230617_070415_entrify_matrix_blocks.php:112)
#0 /var/www/craft/vendor/craftcms/cms/src/db/Migration.php(50): craft\migrations\m230617_070415_entrify_matrix_blocks->safeUp()
#1 /var/www/craft/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(758): craft\db\Migration->up()
#2 /var/www/craft/vendor/craftcms/cms/src/console/controllers/MigrateController.php(382): yii\console\controllers\BaseMigrateController->migrateUp()

The $fieldLayoutUid layout uid does exist in the fieldlayouts table, if that helps.

$fieldLayout = $fieldLayoutUid ? $fieldsService->getLayoutByUid($fieldLayoutUid) : new FieldLayout();

Craft CMS version

5.5.8

PHP version

8.3.6

Operating system and version

Ubuntu 24.04

Database type and version

postgresql 16.6

Image driver and version

No response

Installed plugins and versions

@maknapp maknapp added the bug label Jan 3, 2025
@andykirk12
Copy link

This is also happening for me - on MariaDB

@maknapp
Copy link
Author

maknapp commented Jan 3, 2025

The migration works for me when using craftcms 3.5.6 instead of 3.5.8. I skipped 3.5.7 and did not try it because the last change in the failed migration was made in 3.5.7.

@jpobojewski
Copy link

Confirmed this was also happening to me from Craft 4 to 5 on MySql 8.0. @mmikkel recommend on Discord the same technique as @maknapp and it resolved the issue.

@brandonkelly
Copy link
Member

Can any of you please send a database backup from before the Craft 5 upgrade, over to support@craftcms.com?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants