[wp-trac] [WordPress Trac] #20902: redirect_canonical() on using permalink: Not all $_GET being redirected

WordPress Trac noreply at wordpress.org
Mon Aug 4 11:57:08 UTC 2025


#20902: redirect_canonical() on using permalink: Not all $_GET being redirected
-------------------------------------------------+-------------------------
 Reporter:  arieputranto                         |       Owner:  chriscct7
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:
Component:  Canonical                            |     Version:  3.4
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests changes-requested                        |
-------------------------------------------------+-------------------------
Changes (by sachinrajcp123):

 * Attachment "20902-preserve-get.patch" added.

 This patch ensures that all existing $_GET query parameters are preserved
 during canonical redirects in redirect_canonical(). Previously, some
 custom query args could be lost when permalinks are enabled. This fix
 merges all current $_GET arguments into the redirect URL, solving the
 issue.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/20902>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list