Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#6996 closed defect (bug) (fixed)

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

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

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 17 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
17 years ago

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

#1 @ryan
17 years ago

  • Milestone changed from 2.7 to 2.5.2

#2 @ryan
17 years ago

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

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

#3 @ryan
17 years ago

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

#4 @ryan
17 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#5 @westi
16 years ago

  • Milestone changed from 2.9 to 2.6
Note: See TracTickets for help on using tickets.