Conversation
|
@ebinnion can you explain when we sync those values. The problme that I see with this solution is that if the site has the value set in the DB but the user is able to visit the same site under both urls. https and http then the problem could still happen that the scheme is switching. (but I am not sure if the previous PR was trying to address that or not) Ask them to set The code looks good and makes sense to me. |
|
We sync those values when we sync callables, which happens when the user visits wp-admin I believe. The issue here isn't the protocol normalization, or that the value flip-flops. The issue is that the site isn't swapping from http to https at all. Likely because users are using methods such as htaccess or a redirect plugin, as opposed to updating the We could tell users to update the values in the db or the constant to have |
There's been an uptick in support tickets where connections are breaking after the site switches to https. This seems to have started with 5.2 or 5.3, likely when we deployed this PR:
#5852
In that PR, we began syncing the raw home/siteurl values from the DB or from the
WP_HOMEandWP_SITEURLconstants. As part of that work, since we were no longer calling functions likeget_home_url()which will set the protocol tohttpswhenis_ssl()is true, thehttpschange wasn't getting picked up.This PR should fix that by adding the
is_ssl()check and setting the protocol tohttpsif so.To test: