[wp-trac] [WordPress Trac] #50976: WordPress stripping out "page" query parameter with 301 redirect

WordPress Trac noreply at wordpress.org
Sat Jan 2 15:51:29 UTC 2021


#50976: WordPress stripping out "page" query parameter with 301 redirect
-----------------------------+----------------------
 Reporter:  aleksihulkkonen  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Rewrite Rules    |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:                   |     Focuses:
-----------------------------+----------------------

Comment (by silentz0r):

 // **Beginning of rant**

 It's ridiculous that this is not mentioned in any changelog but developers
 have to dig deep and end up on a thread where this is mentioned on the
 side. It is things like this one that give WordPress the "anti-developer"
 reputation that it has.

 I understand this is not something that's going to be changed and I have
 no problem with that, but not mentioning it on any changelog and also
 trying to pass it as "something undocumented that shouldn't have worked"
 is ridiculous. Wordpress is one of the main web drivers and should handle
 such things in a better way. It is very unprofessional to dismiss this
 issue.

 Now, onto specifics. The term "page" is most likely the most common term
 used in web development. Writing an MVC application, if you are writing a
 controller and want to pass the name/slug of the page you want to access,
 you most likely are going to end up using the query parameter "page".
 Reserving such a common term is bad, let alone doing it silently. Since
 the query parameter is not even visible by the end user and is stripped
 before the 301 redirect, Wordpress could have used something like "_page",
 "wp_page" or even have a standard for reserved query parameters (e.g. all
 parameters starting with "wp_"). Reserving one, if not the, most common
 terms as a reserved parameter is bad.

 It's insane that you do not want to understand that you broke a lot of
 plugins and websites and that this is not the way to go about things. I
 wouldn't be surprised if the people who made the change for 5.5 were even
 aware that the "page" query parameter worked the way it did. And of course
 my crappy plugins that I only use myself are irrelevant to Wordpress, but
 I'm sure famous plugins will eventually suffer from this as well.

 // **End of rant**

 Please provide a git commit hash or line of code that shows how this
 "undocumented behavior" was changed in 5.5 so we can shed some light into
 this.

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


More information about the wp-trac mailing list