Skip to content

[4.16.13]: utils/fix-field-layout-uids fails - null in argument in _fixUidsInLayout() #17848

@wolispace

Description

@wolispace

What happened?

Description

Starting to upgrade from 4.16.13 to 5
Site upgraded OK to php 8.2 and MariaDB 10.11
Run ddev craft utils/fix-field-layout-uids

Looking for duplicate UUIDs ...
Exception 'TypeError' with message 'craft\console\controllers\utils\FixFieldLayoutUidsController::_fixUidsInLayout(): Argument #1 ($fieldLayoutConfig) must be of type array, null given, called in /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php on line 54'
...

Steps to reproduce

  1. upgrade php and MariaDB
  2. run utils/fix-field-layout-uids

Expected behavior

No errors as with other sites I have migrated to Craft 5

Actual behavior

Error. I assume something is wrong with my DB as this has not happened with other sites.

Do you have any suggestions of how I can work out what is wrong?

Looking for duplicate UUIDs ...
Exception 'TypeError' with message 'craft\console\controllers\utils\FixFieldLayoutUidsController::_fixUidsInLayout(): Argument #1 ($fieldLayoutConfig) must be of type array, null given, called in /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php on line 54'

in /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php:79

Stack trace:
#0 /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php(54): craft\console\controllers\utils\FixFieldLayoutUidsController->_fixUidsInLayout(NULL, 0, 'comments.commen...', Array, false)
#1 /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php(74): craft\console\controllers\utils\FixFieldLayoutUidsController->_fixUids(Array, 0, 'comments.commen...', Array)
#2 /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php(74): craft\console\controllers\utils\FixFieldLayoutUidsController->_fixUids(Array, 0, 'comments', Array)
#3 /var/www/html/vendor/craftcms/cms/src/console/controllers/utils/FixFieldLayoutUidsController.php(33): craft\console\controllers\utils\FixFieldLayoutUidsController->_fixUids(Array, 0)
#4 [internal function]: craft\console\controllers\utils\FixFieldLayoutUidsController->actionIndex()
#5 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#7 /var/www/html/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('', Array)
#8 /var/www/html/vendor/craftcms/cms/src/console/ControllerTrait.php(90): yii\console\Controller->runAction('', Array)
#9 /var/www/html/vendor/craftcms/cms/src/console/Controller.php(216): craft\console\Controller->traitRunAction('', Array)
#10 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): craft\console\Controller->runAction('', Array)
#11 /var/www/html/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('utils/fix-field...', Array)
#12 /var/www/html/vendor/craftcms/cms/src/console/Application.php(91): yii\console\Application->runAction('utils/fix-field...', Array)
#13 /var/www/html/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('utils/fix-field...', Array)
#14 /var/www/html/vendor/craftcms/cms/src/console/Application.php(122): yii\console\Application->handleRequest(Object(craft\console\Request))
#15 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#16 /var/www/html/craft(13): yii\base\Application->run()
#17 {main}

Craft CMS version

4.16.13

PHP version

8.2.28

Operating system and version

No response

Database type and version

MariaDB 10.11.11

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions