senlin / classic-editor-addon

This free "Classic Editor Addon" plugin makes sure that Gutenberg cannot be accidentally activated even while the "Classic Editor" plugin is active.
GNU General Public License v3.0
19 stars 5 forks source link

Classic Editor Addon 2.6.4: Can't log in to backend any more #9

Closed hussong closed 2 years ago

hussong commented 2 years ago

After auto-updating from version 2.6.3 to 2.6.4 earlier today (on a multisite install), backend users couldn't access the dashboard (or anything in /wp-admin/) anymore.

The message shown to user was “Sorry, you are not allowed to access this Page”.

Related warnings from debug log are:

[24-Jan-2022 11:30:02 UTC] PHP Warning:  Use of undefined constant SECURE_AUTH_COOKIE - assumed 'SECURE_AUTH_COOKIE' (this will throw an Error in a future version of PHP) in /var/www/clients/client5187/web13183/web/wp-includes/pluggable.php on line 847
[24-Jan-2022 11:30:02 UTC] PHP Warning:  Use of undefined constant LOGGED_IN_COOKIE - assumed 'LOGGED_IN_COOKIE' (this will throw an Error in a future version of PHP) in /var/www/clients/client5187/web13183/web/wp-includes/user.php on line 532
[24-Jan-2022 11:30:02 UTC] PHP Warning:  Use of undefined constant LOGGED_IN_COOKIE - assumed 'LOGGED_IN_COOKIE' (this will throw an Error in a future version of PHP) in /var/www/clients/client5187/web13183/web/wp-includes/pluggable.php on line 843

After disabling the plugin, access to dashboard works again.

Re-activating the plugin reproducibly restores the dashboard issues and debug log warnings.

Hope this helps!

senlin commented 2 years ago

I don't understand where all of a sudden these things come from as I only updated the version of the WP_Dependency_Installer.

I did notice a slight different way of calling the installer, which I have added to the 264-issues branch. Would it be possible for you to change these 2 lines in your plugin to see if that solves the issues?

https://github.com/senlin/classic-editor-addon/blob/264-issues/classic-editor-addon.php#L28-L30

hussong commented 2 years ago

Thanks for the quick reply.

I've tried both ways of calling the installer

include_once( __DIR__ . '/vendor/autoload.php' );
WP_Dependency_Installer::instance()->run( __DIR__ );
require_once __DIR__ . '/vendor/autoload.php';
WP_Dependency_Installer::instance( __DIR__ )->run();

and they both lead to the same error.

After rolling back to 2.6.3, I can activate the plugin without issues.

This leads me to believe that there are maybe other changes between 2.6.3 and 2.6.4 that cause the issue?

senlin commented 2 years ago

As I explained before and which you can also read in the changelog, I updated the WP Dependency Installer.

Feel free to see all the changes: https://github.com/senlin/classic-editor-addon/commit/4a958f982b57c4eeafc36fa6efa13bf7e4176e9a

senlin commented 2 years ago

I have released v3.0.0 that solves the conflicts

hussong commented 2 years ago

I am happy to confirm that everything works like a charm again with v3.0.1. Thank you for the quick update!

After reading https://github.com/afragen/wp-dependency-installer/issues/68, I would like to add that on the site where I noticed the problems yesterday, we are using the Easy WP SMTP plugin, which may have played a role in bringing out the issue.