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

Migrantion fails when upgrading from 3.0 to 3.1 #32

Closed
dave-stillandnimble opened this issue Jul 5, 2022 · 4 comments
Closed

Migrantion fails when upgrading from 3.0 to 3.1 #32

dave-stillandnimble opened this issue Jul 5, 2022 · 4 comments

Comments

@dave-stillandnimble
Copy link

Description
When attempting upgrade from 3.0 to 3.1 the migration fails with the following error:

`error: The command "'/Applications/MAMP/bin/php/php7.4.12/bin/php' '/Users/--/craft' 'migrate/all' '--no-backup' '--no-content'" failed.

Exit Code: 1(General error)

Working directory: /Users/--

Output:

Checking for pending Craft and plugin migrations ...
Total 1 new Table Maker migration to be applied:
- m190412_182837_update_craft2_fieldtype

*** applying m190412_182837_update_craft2_fieldtype
> Updating Table Maker field type...
> update in {{%fields}} ... done (time: 0.003s)
*** applied m190412_182837_update_craft2_fieldtype (time: 0.018s)

Error Output:

Exception 'craft\errors\InvalidPluginException' with message 'No plugin exists with the handle "tablemaker".'

in /Users/--/vendor/craftcms/cms/src/services/Plugins.php:854

Stack trace:
#0 /Users/--/vendor/craftcms/cms/src/console/controllers/MigrateController.php(399): craft\services\Plugins->updatePluginVersionInfo(Object(verbb\tablemaker\TableMaker))
#1 [internal function]: craft\console\controllers\MigrateController->actionAll()
#2 /Users/--/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /Users/--/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#4 /Users/--/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction('all', Array)
#5 /Users/--/vendor/yiisoft/yii2/base/Module.php(552): yii\console\Controller->runAction('all', Array)
#6 /Users/--/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate/all', Array)
#7 /Users/--/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('migrate/all', Array)
#8 /Users/--/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('migrate/all', Array)
#9 /Users/--/vendor/craftcms/cms/src/console/Application.php(118): yii\console\Application->handleRequest(Object(craft\console\Request))
#10 /Users/--/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#11 /Users/--/craft(13): yii\base\Application->run()
#12 {main}

Output:

Checking for pending Craft and plugin migrations ...
Total 1 new Table Maker migration to be applied:
- m190412_182837_update_craft2_fieldtype

*** applying m190412_182837_update_craft2_fieldtype
> Updating Table Maker field type...
> update in {{%fields}} ... done (time: 0.003s)
*** applied m190412_182837_update_craft2_fieldtype (time: 0.018s)`

Steps to reproduce

  1. Perform upgrade on command line

Additional info

  • Plugin version: 3.0
  • Craft version: 3.7.46
  • Multi-site: No

Additional context

@engram-design
Copy link
Member

Firstly, you might want to fix that backup command failing.

As for the "No plugin exists with the handle" error, I don't think that's unique to Table Maker. I've seen that happen for other plugins, but not recently. Usually these have been for larger updates coming from older versions of Craft or plugins.

If you run a ./craft project-config rebuild, and ensure the plugin is installed craft plugin/install tablemaker

@dave-stillandnimble
Copy link
Author

I don't think the backup command failed because I was able to restore successfully after the migration failed.

It turns out that once I had updated Craft to the latest version first and then upgraded table maker after (instead of doing both at the same time) there didn't seem to be an issue.

I've been running updates on about 10 sites this month that have the table maker plugin and some failed as above and others went through fine.

I'm not entirely sure whats going on here, or whether it is something with my local setup, but thanks for the advice.

I'll report back if I can work out what particular conditions cause this to happen in case anyone else also experiences them.

@engram-design
Copy link
Member

Sorry, I did misread that error message, it's saying The command "./craft migrate/all" failed which is correct. I'll see if that order of migration/update makes a difference

@engram-design
Copy link
Member

Okay, so I think this should be fixed in 3.0.2 as the migration was doing some extra stuff that was probably messing things up for installs.

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