Fix SQLite module deactivation routine to make standalone plugin migration work correctly#743
Merged
mukeshpanchal27 merged 2 commits intorelease/2.4.0from Jun 20, 2023
Merged
Conversation
…ation work correctly.
swissspidy
approved these changes
Jun 19, 2023
mukeshpanchal27
approved these changes
Jun 19, 2023
Member
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks @felixarntz, Great work!
10upsimon
reviewed
Jun 20, 2023
| 'images/dominant-color-images' => 'DOMINANT_COLOR_IMAGES_VERSION', | ||
| 'images/fetchpriority' => 'FETCHPRIORITY_VERSION', | ||
| 'images/webp-uploads' => 'WEBP_UPLOADS_VERSION', | ||
| 'database/sqlite' => 'SQLITE_MAIN_FILE', |
Contributor
There was a problem hiding this comment.
@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
10upsimon
approved these changes
Jun 20, 2023
Contributor
10upsimon
left a comment
There was a problem hiding this comment.
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.
mukeshpanchal27
approved these changes
Jun 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.