Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#40032 new defect (bug)

Automatic redirects with _wp_old_slug won't mantain GET parameters if present

Reported by: DrLightman Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: has-patch needs-testing
Focuses: Cc:


If for example links come up with GET parameters, for example utm parameters for analytics, they get stripped before the redirect.

post_name = 'new-slug'
_wp_old_slug = 'old-slug'


Wordpress will build the link for the redirect to the new slug without any GET parameter:


I think it should mantein them instead:


I'm not even sure if this should be classified as a bug, if it's the correct behaviour or not. I'll let you judge.

Attachments (1)

40032.patch (562 bytes) - added by desrosj 4 years ago.
Preserve $_GET params on _wp_old_slug redirects

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
4 years ago

  • Summary changed from Automatic redirects with _wp_old_slug won't mantein GET parameters if present to Automatic redirects with _wp_old_slug won't mantain GET parameters if present

4 years ago

Preserve $_GET params on _wp_old_slug redirects

#2 @desrosj
4 years ago

  • Keywords has-patch needs-testing added
Note: See TracTickets for help on using tickets.