-
Notifications
You must be signed in to change notification settings - Fork 139
Fix SQLite module deactivation routine to make standalone plugin migration work correctly #743
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
Conversation
…ation work correctly.
aristath
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @felixarntz, Great work!
| 'images/dominant-color-images' => 'DOMINANT_COLOR_IMAGES_VERSION', | ||
| 'images/fetchpriority' => 'FETCHPRIORITY_VERSION', | ||
| 'images/webp-uploads' => 'WEBP_UPLOADS_VERSION', | ||
| 'database/sqlite' => 'SQLITE_MAIN_FILE', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixarntz @mukeshpanchal27 I added this so that the PL SQLite module option can not be accidentally enabled by the end user once the standalone plugin is activated, thus preventing the following unnecessary fatal error:
Fatal error: Cannot redeclare w_install (previously declared in /var/www/html/w-content/plugins/sqlite-database-integration/wp-includes/sqlite/install-functions.php:138)in /var/www/html/wp-content/plugins/performance/modules/database/sqlite/wp-includes/sqlite/install-functions.php on line 122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch!
10upsimon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a fix to prevent activation of the sqlite module when the standalone plugin is enabled. Tested the rest and looks good to go for me.
Summary
Follow up to #739: When testing the migration flow from the SQLite module to the standalone plugin, @10upsimon noticed that the module is still active technically in case that the SQLite plugin gets deactivated after the migration. That is because the logic to deactivate the module was only applying on the SQLite database, but not the MySQL/MariaDB database.
This PR fixes that problem.
Relevant technical choices
db.phpdrop-in file is present, since the SQLite plugin removes the PL drop-in before and only adds its own drop-in after.Testing steps
The 7th point is the one that this PR fixes. Previously, the PL module would have been active at that point.
Checklist
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.