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

yii\base\ErrorException: Undefined index: name #6029

Closed
kaspar-allenbach opened this issue May 6, 2020 · 5 comments
Closed

yii\base\ErrorException: Undefined index: name #6029

kaspar-allenbach opened this issue May 6, 2020 · 5 comments

Comments

@kaspar-allenbach
Copy link
Contributor

kaspar-allenbach commented May 6, 2020

Description

I wanted to update a site from 3.1.23 to 3.1.34.3.

Now I have this error:

yii\base\ErrorException: Undefined index: name

Migration: craft\migrations\m191222_002848_peer_asset_permissions

Output:

> insert into {{%userpermissions}} ... done (time: 0.001s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.001s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.001s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.001s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.001s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
> insert into {{%userpermissions}} ... done (time: 0.000s)
> batch insert into {{%userpermissions_users}} ... done (time: 0.000s)
Exception: Undefined index: name (/Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/UserGroups.php:256)
#0 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/web/ErrorHandler.php(74): yii\base\ErrorHandler->handleError(8, 'Undefined index...', '/Users/atelierw...', 256)
#1 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/UserGroups.php(256): craft\web\ErrorHandler->handleError(8, 'Undefined index...', '/Users/atelierw...', 256, Array)
#2 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/ProjectConfig.php(1102): craft\services\UserGroups->handleChangedUserGroup(Object(craft\events\ConfigEvent))
#3 [internal function]: craft\services\ProjectConfig->handleChangeEvent(Object(craft\events\ConfigEvent))
#4 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Array, Object(craft\events\ConfigEvent))
#5 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/ProjectConfig.php(678): yii\base\Component->trigger('updateItem', Object(craft\events\ConfigEvent))
#6 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/ProjectConfig.php(1092): craft\services\ProjectConfig->processConfigChanges('users.groups.1e...')
#7 [internal function]: craft\services\ProjectConfig->handleChangeEvent(Object(craft\events\ConfigEvent))
#8 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/yiisoft/yii2/base/Component.php(627): call_user_func(Array, Object(craft\events\ConfigEvent))
#9 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/ProjectConfig.php(678): yii\base\Component->trigger('updateItem', Object(craft\events\ConfigEvent))
#10 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/ProjectConfig.php(489): craft\services\ProjectConfig->processConfigChanges('users.groups.1e...', true, '')
#11 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/migrations/m191222_002848_peer_asset_permissions.php(74): craft\services\ProjectConfig->set('users.groups.1e...', Array)
#12 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/db/Migration.php(52): craft\migrations\m191222_002848_peer_asset_permissions->safeUp()
#13 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/db/MigrationManager.php(233): craft\db\Migration->up(true)
#14 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/db/MigrationManager.php(153): craft\db\MigrationManager->migrateUp(Object(craft\migrations\m191222_002848_peer_asset_permissions))
#15 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/services/Updates.php(225): craft\db\MigrationManager->up()
#16 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(510): craft\services\Updates->runMigrations(Array)
#17 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/controllers/UpdaterController.php(203): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#18 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#19 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#20 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#21 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('migrate', Array)
#22 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('migrate', Array)
#23 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('updater/migrate', Array)
#24 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/web/Application.php(646): craft\web\Application->runAction('updater/migrate')
#25 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/craftcms/cms/src/web/Application.php(223): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#26 /Users/atelierworkstation/Documents/git-local/HFLBS/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#27 /Users/atelierworkstation/Documents/git-local/HFLBS/www/index.php(21): yii\base\Application->run()
#28 {main}

This site has been migrated from craft 2 to craft 3. And I experience troubles without end all the time on every corner because db table don't seem to be updated properly.

I have also this problem: verbb/super-table#126 and this problem: craftcms/redactor#140 which is why I wanted to upgrade but now nothing works any longer. And I have also this problem: verbb/super-table#355

Steps to reproduce

  1. Hit update
  2. wait

Additional info

  • Craft version: 3.1.23
  • PHP version: 7.3.9
@brandonkelly
Copy link
Member

Is there a reason you’re not updating to the latest versions?

@kaspar-allenbach
Copy link
Contributor Author

That's what I'm trying to do.
But I cannot update directly because there's this message
"You've reached a program stop. You need to update to 3.1.34.3 first"

@kaspar-allenbach
Copy link
Contributor Author

I deleted project.yaml and disabled useProjectConfigFile.
Then I updated step by step.

Now I have the error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'craft_hafl_local.craft_projectconfig' doesn't exist
The SQL being executed was: SELECT path, value
FROM craft_projectconfig
ORDER BY path

what does that mean?

@kaspar-allenbach
Copy link
Contributor Author

something's very off. i need to start from scratch

@brandonkelly
Copy link
Member

Yeah sounds like maybe there was an error earlier on.

You should be able to update straight from 2.x to the latest 3.4 and skip that breakpoint. If something goes wrong with that, please send your Craft 2 database backup over to [email protected] and we can help you from there.

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

No branches or pull requests

2 participants