Opened 7 years ago
Last modified 7 years ago
#41272 new defect (bug)
Unattached media URLs broken for anything over 1000
Reported by: | henry.wright | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
Steps to reproduce
- On your local computer, rename a file to
1180.jpg
- Upload the file to the Media Library
- Visit
example.com/1180
You will get a 404 broken link.
If you do the same for a 1, 2 or 3 digit filename, you won't see the issue.
example.com/31.jpg // Works example.com/872.jpg // Works
The problem isn't just related to images.
example.com/1871.mp3 // 404
Change History (6)
#2
@
7 years ago
I can't seem to edit the examples I gave in the ticket description but they should read:
31.jpg example.com/31 // Works 872.jpg example.com/872 // Works
and
1871.mp3 example.com/1871 // 404
#3
follow-up:
↓ 4
@
7 years ago
I just tested again on a fresh install with no existing posts. Same issue. This indicates that this isn't a permalink conflict.
#4
in reply to:
↑ 3
@
7 years ago
Replying to henry.wright:
I just tested again on a fresh install with no existing posts. Same issue. This indicates that this isn't a permalink conflict.
Right. If I had to guess, a 4-digit number is treated as a year instead of an attachment slug. I thought #5305 fixed that, but apparently not for all cases.
Related: #5305, #13459, #24612.