-
Notifications
You must be signed in to change notification settings - Fork 0
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
Plugin deactivated after update #4
Comments
This is neither on purpose, nor something WordPress is normally doing. Since WordPress 6.3 plugin updates work like this:
At no point does WordPress itself change the wp_options database record which contains the list of active plugins. The only way an updated plugin would be disabled after update would be either if the plugin experienced a PHP error, or if a third party plugin has a hook or filter which gets called during the plugin update process (it's a thing!) and either does something stupid, or crashes. In the latter case, WordPress cannot tell the difference between the updated plugin crashing, or the third party plugin's hook/filter crashing, so it will end up disabling the updated plugin. I know that our plugins update cleanly, without causing a PHP error, across all supported PHP and WordPress versions, so this leaves us with either a third party plugin doing something stupid, or something breaking on your host for another reason. In any case, this is not something I can help you with, as I don't have control over your hosting or third party code. To make things difficult to debug, to an infuriating degree, WordPress has decided to mask all error messages which could point a developer to the source of the problem – not just from the browser output, but also from the server error log files. They do that by installing an idiotic exceptions handler which won't log most of these update errors even if you tell it to do so. My solution to WordPress' dog breakfast of an exceptions handler is to install the file add_filter(
'wp_php_error_message', function ($message, $error) {
if (!defined('MY_CUSTOM_ERROR_HANDLER') || !MY_CUSTOM_ERROR_HANDLER)
{
return $message;
}
$theMessage = $error['message'] ?? '(no message)';
$file = $error['file'] ?? '(no file)';
$line = $error['line'] ?? '(no line)';
$context = <<< HTML
<div style="border: thick solid red; border-radius: 1em; padding: 1em; margin: 1em 0;">
<h4 style="margin: 0 0 0.75em">$theMessage</h4>
<p style="margin: 0">$file:$line</p>
</div>
HTML;
return $context . $message;
}, 10, 2
); then edit define('MY_CUSTOM_ERROR_HANDLER', true); just above the |
Ok, interesting. This happens to me on multiple sites, which are hosted with three different providers. I will set up one of them with the code you suggested and see, if I get lucky. Thanks for the advice, |
Hi,
So I have the Panopticon Connector installed on several Wordpress sites. When I update a plugin via the Panopticon extension dashboard, the plugin does get updated. But afterwards, that same plugin is no longer active. I just tested this with current updates. This happens regardless what plugin gets updated, even Akeeba's very own Backup for Wordpress.
Am I missing a setting or something? Or is this on purpose?
Thanks and best regards,
Stefam
The text was updated successfully, but these errors were encountered: