Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#6996 closed defect (bug) (fixed)

Attachment permalinks have incorrect trailing slash, do not match canonical URL

Reported by: Sam_a Owned by:
Priority: normal Milestone: 2.6
Component: General Version: 2.5.1
Severity: normal Keywords: has-patch tested get_attachment_link user_trailingslashit redirect_canonical
Cc: Focuses:

Description

When the permalink structure lacks a trailing slash, WordPress generates attachment permalinks with a trailing slash (/attachment-name/), but redirects them to the correct URL (/attachment-name).

Patch fixes the problem by applying user_trailingslashit() in get_attachment_link().

Attachments (1)

get_attachment_link_user_trailingslashit.patch​ (461 bytes ) - added by Sam_a 18 years ago.
Applies user_trailingslashit() in get_attachment_permalink(). Tested successfully in 2.5.1

Download all attachments as: .zip

Change History (6)

@Sam_a
18 years ago

Applies user_trailingslashit() in get_attachment_permalink(). Tested successfully in 2.5.1

#1 @ryan
18 years ago

  • Milestone 2.7 → 2.5.2

#2 @ryan
18 years ago

  • Resolution → fixed
  • Status new → closed

(In [7954]) Use user_trailingslashit. Props Sam_a. fixes #6996 for 2.5

#3 @ryan
18 years ago

(In [7955]) Use user_trailingslashit. Props Sam_a. fixes #6996 for trunk

#4 @ryan
18 years ago

  • Milestone 2.5.2 → 2.9

Milestone 2.5.2 deleted

#5 @westi
18 years ago

  • Milestone 2.9 → 2.6
Note: See TracTickets for help on using tickets.