#6996 closed defect (bug) (fixed)
Attachment permalinks have incorrect trailing slash, do not match canonical URL
| Reported by: |
|
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: |
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)
Change History (6)
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

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