-
Notifications
You must be signed in to change notification settings - Fork 642
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
[4.x]: Running craft update all/pluginhandle breaks site #11399
Comments
Do you have the |
I manually upgraded from craft 3 to craft 4, editing each plugin in turn in the composer file. Plugins all installed fine although some plugins had bugs (that didnt hinder the installation at least). After this point, running update via the CLI brings the above issues. Unsure if it could be one of the plugins that is blocking the migrations running? |
I ran into the same issue while updating vom 4.0.2 to 4.0.4 using |
@JansonChe did you find a workaround at all? |
I'm getting the same error trying to update any plugin on a |
Not really, no, I just rolled back to the version that was working (vendor folder deleted and dependencies re-installed). Because this update is not a critical/urgent one for my project, I've decided to wait and check for progress on this issue. How about you @alexr8 ? |
@christophstockinger That looks like a separate issue. (This one affects Craft 3 and 4, and is Composer-specific, not a v4 migration issue.) Please either post as a new issue here, or get in touch via [email protected]. |
@adrienpicard Is your local development environment Nitro as well? |
@angrybrad no I should have said sorry, it's a homebrew PHP / MariaDB install running on macOS. PHP version Operating system and version Database type and version |
I'm not able to reproduce locally or with @alexr8's files, unfortunately. Any chance anyone can replicate this on a public box we can get some SSH/Craft control panel access to? |
@angrybrad I'm working on a few projects at the moment but am only facing this issue with one. All Craft 3.7.* installs, all using the same dev environment. Happy to share more details if that helps. |
@angrybrad @alexr8 Hmmm I have two projects that where very similar in their environment and versions, but only one had this problem when trying to update. While comparing the two composer.json files the only real difference was:
The failing project was missing these lines, but it added only |
@JansonChe @angrybrad can confirm manually adding |
@angrybrad i've made some progress in that I:
As there are currently no new updates available as i've just installed the latest, i can't test whether edit: seeing that the |
Was getting the same issue. When running an update for Craft or any plugin I got an undefined error. Adding "yiisoft/yii2-composer": true under config in composer.json fixed this for me too. |
I’ve just updated Craft’s internal Composer commands to ensure that That change is out now in 3.7.45.2 and 4.0.5.2, however it won’t kick in until you’re already running at least one of those Craft versions. |
Sorry to bring this up again. Actions: Error: Important notes:
|
Hey @kellyannmcnamara01! Check |
What happened?
Description
When running
php craft update all
orphp craft update handle
, an error is encountered that breaks the site. The error in terminal is:error: The command "'/usr/local/bin/php' '/app/craft' 'migrate/all' '--no-backup' '--no-content'" failed.
(more output below)When loading pages on the front-end, the following error is displayed:
Not instantiable – [yii\di\NotInstantiableException](http://www.yiiframework.com/doc-2.0/yii-di-notinstantiableexception.html) Failed to instantiate component or class "yii\shell\Bootstrap". ↵ Caused by: ReflectionException Class "yii\shell\Bootstrap" does not exist
To fix, i restore the database, delete my vendor folder, and run
composer install
to restore to its previous state.Steps to reproduce
php craft update
on all plugins or a single plugin (doesn't appear to matter which one) from the terminal.Expected behavior
The plugin(s) should be updated to the latest version.
Actual behavior
The update fails with the following readout (full):
`Backing up the database ... done
Performing update with Composer ... done
Applying new migrations ... error: The command "'/usr/local/bin/php' '/app/craft' 'migrate/all' '--no-backup' '--no-content'" failed.
Exit Code: 1(General error)
Working directory: /app
Output:
Craft CMS version
4.0.3
PHP version
8.0.11
Operating system and version
Nitro
Database type and version
MySQL 8.0
Image driver and version
No response
Installed plugins and versions
"craftcms/aws-s3": "2.0.1",
"craftcms/cms": "^4.0.0",
"craftcms/feed-me": "5.0.4",
"craftcms/redactor": "3.0.0",
"hybridinteractive/craft-position-fieldtype": "4.0.0-beta.3",
"leowebguy/mix-manifest": "1.0.1",
"mmikkel/retcon": "2.4.2",
"nystudio107/craft-cookies": "4.0.0",
"nystudio107/craft-seomatic": "4.0.0",
"percipiolondon/craft-tweet-feed": "4.0.0",
"putyourlightson/craft-sprig": "2.0.1",
"sebastianlenz/linkfield": "2.1.3-rc",
"solspace/craft-freeform": "4.0.0-beta.8",
"solspace/craft3-calendar": "4.0.0-beta.4",
"spacecatninja/imager-x": "4.0.1",
"spicyweb/craft-embedded-assets": "3.0.1",
"verbb/image-resizer": "3.0.0-beta.1",
"verbb/knock-knock": "2.0.0-beta.1",
"verbb/super-table": "3.0.0-beta.4",
"vlucas/phpdotenv": "^3.4.0"
The text was updated successfully, but these errors were encountered: