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

Trigger SafeMode if a plugin update is broken #15555

Merged
merged 2 commits into from Mar 14, 2020
Merged

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Feb 11, 2020

Assuming a plugin contains an invalid update script (e.g. classname, filename or namespace doesn't match), Matomo will currently get stuck in the update process with a message like The class \Piwik\Plugins\TestPlugin\Updates_0_2_3 was not found in /path/to/matomo/plugins/TestPlugin/Updates/0.2.3.php. There is currently no solution to fix that, besides deactivating the plugin on command line or directly in config.

By throwing an Error instead of an Exception, Matomo will show the safemode sceen, that allows deactivating/uninstalling a plugin directly.

@sgiehl sgiehl added the Needs Review PRs that need a code review label Feb 11, 2020
@sgiehl sgiehl added this to the 4.0.0 milestone Feb 11, 2020
@diosmosis diosmosis merged commit 51522d9 into 4.x-dev Mar 14, 2020
@diosmosis diosmosis deleted the pluginupdatefatal branch March 14, 2020 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants