Ticket #6996 (closed defect (bug): fixed)

Opened 8 months ago

Last modified 5 months ago

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

Reported by: Sam_a Assigned to: anonymous
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:

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

get_attachment_link_user_trailingslashit.patch (461 bytes) - added by Sam_a on 05/19/08 17:37:55.
Applies user_trailingslashit() in get_attachment_permalink(). Tested successfully in 2.5.1

Change History

05/19/08 17:37:55 changed by Sam_a

  • attachment get_attachment_link_user_trailingslashit.patch added.

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

05/19/08 18:48:50 changed by ryan

  • milestone changed from 2.7 to 2.5.2.

05/19/08 18:51:13 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

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

05/19/08 18:51:29 changed by ryan

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

07/15/08 16:24:07 changed by ryan

  • milestone changed from 2.5.2 to 2.9.

Milestone 2.5.2 deleted

07/30/08 20:34:46 changed by westi

  • milestone changed from 2.9 to 2.6.