Repair Tool: Compare filterable/cachable queries with direct DB queries before editing config - #7589
Open
pdclark wants to merge 1 commit into
Open
Conversation
… queries before editing config
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.
Description
Repair Tool, when checking Pods data structure, at times ran queries which could be altered by filters, including object and transient cache.
This draft compares each query to a direct database query, and if consistent, pauses the repair and surfaces a (currently long-winded) message indicating plugins may be effecting data structure.
If the query for
maybe_fix_fields_with_invalid_field_type()were corrupted in particular, all fields would be converted totexttype.Related GitHub issue(s)
Slack Report: https://podswp.slack.com/archives/C02SVLHQF/p1785336123838039?thread_ts=1785276302.714959&cid=C02SVLHQF
Testing instructions
Create some Pods. Add one of these filters then attempt a repair:
Run
wp pods tools flush-cacheafter adding the filters...Post_Type::find()caches results (correct or incorrect) to a one-week transient.Changelog text for these changes
Repair Tool: Protect and notify of potential plugin conflicts.
PR checklist
There is a unit test... there was also an environment setup with scripts / WP CLI etc, not included...