Opened 2 years ago

Closed 2 years ago

#15775 closed defect (bug) (fixed)

Redirect Name Requests Correctly with Default Permalinks

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

Description

Suppose a post has the slug

an-exciting-post-title

but someone requests

/?name=an-exciting-post

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

/?p=123&name=an-exciting-post

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 2 years ago.

Download all attachments as: .zip

Change History (3)

  • Owner set to MarkJaquith
  • Status changed from new to assigned
  • 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.