[wp-trac] [WordPress Trac] #36663: Wordpress 4.5 Query Strings Replacing "." with "_"
WordPress Trac
noreply at wordpress.org
Tue Apr 26 16:16:21 UTC 2016
#36663: Wordpress 4.5 Query Strings Replacing "." with "_"
-------------------------------+------------------------------
Reporter: michael.bucklin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 4.5
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by michael.bucklin):
I may have not been explaining the issue well enough, i apologize for
that. Here is a little more information. To reproduce:
1) Install a fresh copy of 4.4.2
2) Log in to the dashboard
3) Go to 'settings', 'reading', and set the front page display to static
page. I chose the Sample page that comes with a fresh install.
4) Pull up the site, but append the following query string to the URL
?wt.mc_id=foobar.
Observe that in the URL bar, the value '?wt.mc_id=foobar' is retained as
is.
5) Now upgrade to 4.5 in the dashboard.
6) Again go to the site with the query string '?wt.mc_id=foobar' appended
to the site URL
Observe that the value 'wt.mc_id' is changed to 'wt_mc_id'. The period is
changed to an underscore, which breaks the JavaScript that is looking for
a value with the period. I can't change the JavaScript as it is from a
well known analytics platform, Webtrends.
---
Digging through the Wordpress code and what changed, i isolated the issue
to line 176 of wp-includes/canonical.php, which in 4.5 reads:
} elseif ( is_page() && !is_feed() && 'page' ==
get_option('show_on_front') && get_queried_object_id() ==
get_option('page_on_front') && ! $redirect_url ) {
In 4.4.2, it read:
} elseif ( is_page() && !is_feed() && isset($wp_query->queried_object) &&
'page' == get_option('show_on_front') && $wp_query->queried_object->ID ==
get_option('page_on_front') && ! $redirect_url ) {
It appears that the change from '$wp_query->queried_object->ID' to
'get_queried_object_id()' causes the change in behavior, which is strange
considering that function is supposed to do the same thing.
I hope this additional information is useful.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36663#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list