[wp-trac] [WordPress Trac] #45666: adding "order" as query arg to the homepage url you are redirected to the last posts page

WordPress Trac noreply at wordpress.org
Mon Dec 17 06:56:30 UTC 2018


#45666: adding "order" as query arg to the homepage url you are redirected to the
last posts page
--------------------------+------------------------------
 Reporter:  giuse         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by giuse):

 Replying to [comment:1 SergeyBiryukov]:
 > Hi @giuse, welcome to WordPress Trac! Thanks for the report.
 >
 > `order` is one of the [https://codex.wordpress.org/Reserved_Terms
 reserved terms] in WordPress. In [source:tags/5.0.1/src/wp-includes/class-
 wp-query.php#L1543 WP_Query::parse_order()], any value other than `ASC` is
 treated as `DESC`.
 >
 > If the home page is set to display the latest posts, adding
 `?order=something` doesn't seem to affect anything.
 >
 > If a static home page is selected in Reading Settings, this parameter
 does indeed show the list of latest posts instead of the home page, but I
 don't necessarily see an issue with that.



 I see a very big issue because WooCommerce uses this query argument in the
 download link for a digital product. If the customer clicks on that link
 instead to download the product sees the last posts.
 In any case this is not normal and I think it can be easily avoided.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45666#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list