[wp-trac] [WordPress Trac] #16373: Wrong page loaded requesting custom registered query_vars when correcting is_* for page_on_front requests
WordPress Trac
wp-trac at lists.automattic.com
Wed Aug 17 03:36:05 UTC 2011
#16373: Wrong page loaded requesting custom registered query_vars when correcting
is_* for page_on_front requests
---------------------------------+-----------------------------
Reporter: jondavis | Owner: markjaquith
Type: defect (bug) | Status: accepted
Priority: high | Milestone: Future Release
Component: Query | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch 3.3-early |
---------------------------------+-----------------------------
Changes (by dd32):
* cc: dd32 (removed)
Comment:
Looking at the changes I made there, This case is simply a use case which
was missed. It would cause the issue before the changes were made, and
after. That code block is simply checking if any public query var ''other
than'' those listed in `array('preview', 'page', 'paged', 'cpage')` are
set, and if so, decides it's not the front page being viewed (as those
query vars most likely map somewhere).
(also note, for anyone playing along at home `$_query` only contains
registered query vars, /?something_not_registered=1 would still be mapped
to the front page)
Jumping back before the changesets mentioned here, to [4956] where the
last major change was, the bug at that point was that only / and
/?preview=true would map to the front page, paging(of the page, and of
comments) wouldn't work on static front page, and any public query vars
being appended would load the Blog posts.
----
Fixing this bug however, The attached patch is basically `( empty($_query)
|| true )` as that array_diff should *always* return empty. I can't seem
to find a use-case (with pretty permalinks enabled) which requires that
if() branch to be there at all anymore, meaning, I think something else
has changed in the query parsing in the last 4 years since everything
-seems- to be working for me without the if. Things to check that still
work with it removed: Endpoints, particually Feeds(posts, and comments)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16373#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list