#6996 closed defect (bug) (fixed)
Attachment permalinks have incorrect trailing slash, do not match canonical URL
| Reported by: |
|
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)
Note: See
TracTickets for help on using
tickets.
Applies user_trailingslashit() in get_attachment_permalink(). Tested successfully in 2.5.1