Sync: Fix issue with syncing raw URLs for multisites#8006
Merged
Conversation
484fa2e to
9fcd051
Compare
Member
|
Can we add a test here? |
Member
|
Also Can you explain what the process will be in fixing sites that are broken? |
Contributor
Author
|
Existing test is now updated.
The sites should update automatically after plugin upgrade, once callables sync. If that fails, the user can initiate a full sync or cycle the connection. |
03eb568 to
d90d1f2
Compare
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.
Fixes #7997
In #7997, @enejb reported an issue where his multisite was syncing an incorrect URL, the base URL for the site. This was caused by #5852 when we/I started syncing the raw URLs.
While I did test multisites, I apparently didn't test multisites with the constant set. Or, I would've noticed the wrong URL was being synced.
I was able to narrow this down to these lines in core WordPress:
The
_config_wp_siteurland_config_wp_homefilters check if theWP_HOMEorWP_SITEURLconstants are set, and if so, uses those constants. BUT ... the filters that call those functions are removed for multisites.In #5852, I was always returning the constant value, which is the incorrect behavior.
To test: