Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#15775 closed defect (bug) (fixed)

Redirect Name Requests Correctly with Default Permalinks

Reported by: filosofo Owned by: MarkJaquith
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Canonical Keywords: has-patch
Focuses: Cc:


Suppose a post has the slug


but someone requests


Then redirect_guess_404_permalink() correctly guesses the permalink for that post, but the incorrect, partial name argument is retained:


and so the posts query fails.

Instead, when redirect_guess_404_permalink() returns a permalink that doesn't have a name argument, the old, incorrect name argument should be removed from the final redirect URL.

Note that in this patch I am using the fix appearing in the patch on #15774, because this patch uses some of the work done there. Applying this patch will also fix #15774.

Attachments (1)

redirect-partial-post-names.15775.diff (960 bytes) - added by filosofo 7 years ago.

Download all attachments as: .zip

Change History (3)

#1 @nacin
7 years ago

  • Owner set to MarkJaquith
  • Status changed from new to assigned

#2 @markjaquith
7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [17031]) Strip partial name= parameters when doing canonical redirection on them with default permalinks. props filosofo. fixes #15775

Note: See TracTickets for help on using tickets.