Opened 8 years ago
Closed 3 years ago
#39279 closed defect (bug) (invalid)
Media gallery in WP 4.7 has incorrect permalinks for PDF's
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | close |
Focuses: | Cc: |
Description
Ever since updating my site to WP 4.7, the media gallery displays incorrect permalinks for PDF's. They are not in the uploads directory, but relative to the homepage. This permalink is incorrect and will redirect to the homepage.
Example: http://image.prntscr.com/image/211cc84ebc414a64ad69a2d269ea77a4.png
Attachments (1)
Change History (7)
#1
@
8 years ago
- Keywords close added
- Version 4.7 deleted
Hey there,
Media files are accessible on the website like posts and pages. When your permalink structure is /%postname%
and the media file is not attached to a post, http://example.com/my-media-file/
is the correct permalink for an attachment. This has been the case for quite a while.
If you want the URL for the actual file inside wp-content, have a look at the meta box on the right of the screen.
#2
@
8 years ago
Thank you for pointing me at the metabox. I totally missed that :)
But still, the permalink which can be seen in the attached picture is not working. When I click on it, it redirects me to the homepage instead of to the file (which I expect it would). Is that how it's supposed to work then?
#3
@
8 years ago
Hi @Marcoevich,
That link should direct you to the attachment page (more like a post for your media item) rather than the URL for the file itself. Can you reset your permalinks and retry to make sure that the URL is being recognized by WordPress?
#4
@
8 years ago
It works when I set the permalink structure to it's default setting. I saw the attachment page. However when I change the permalink structure back to post name, that link doesn't work again, going back to homepage.
This ticket was mentioned in Slack in #core-media by joedolson. View the logs.
3 years ago
#6
@
3 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Hi @Marcoevich this ticket was brought up in the recent Media component meeting. it seems this is not valid now 6 years later. Thank you for this report, and if you see any other issues feel free to create a new ticket!
Image which clearly displays the issue