#19266 closed defect (bug) (invalid)
Media attached to (custom) pages 404 when loading the media attachment page
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | high | |
| Severity: | critical | Version: | 3.2.1 |
| Component: | General | Keywords: | |
| Focuses: | Cc: |
Description
if you select attachment URL in the media post
For a example see screenshot for the settings
http://wp-dev.bearne.ca/test/
click on the image and you get an 404
Attachments (1)
Change History (12)
#1
@
14 years ago
This works in 3.2.1, I imagine?
Might be related to get_page_by_path() and rewrite changes. Haven't investigated yet.
#2
@
14 years ago
- Milestone changed from Awaiting Review to 3.3
- Priority changed from normal to high
- Severity changed from normal to critical
#3
@
14 years ago
pbearne, can you update to current trunk and test it again?
I tested it once and it fails, second one works.
#5
follow-up:
↓ 6
@
14 years ago
just pulled down http://wordpress.org/nightly-builds/wordpress-latest.zip still seeing the problem
disabled all plugins etc.
Permalinks set to /%postname%/
Paul
#6
in reply to:
↑ 5
@
14 years ago
Replying to pbearne:
just pulled down http://wordpress.org/nightly-builds/wordpress-latest.zip still seeing the problem
I just retested on the link you provided and it seems to be working.
#7
@
14 years ago
still seeing the problem
Can you give some steps to reproduce it? Filename? Is it possible to test it on another server/local installation?
#8
follow-up:
↓ 10
@
14 years ago
Done bit more testing
And looks like this plugin is doing the breaking "Custom Content Type Manager" http://code.google.com/p/wordpress-custom-content-type-manager/
So the Question now is what is it doing?
#9
@
14 years ago
Hi
WordPress 3.3 beta3+ nightly build
create a post
add an image and set the image link to the "Attachment Post URL"
save and view click the image to visit the image attachment page
turn on/off the "Custom Content Type Manager" plugin and the link breaks / works
see it fail here http://wp-dev.bearne.ca/2011/test/
Ping me if you need more info
Paul
#10
in reply to:
↑ 8
@
14 years ago
- Keywords reporter-feedback removed
- Milestone 3.3 deleted
- Resolution set to invalid
- Status changed from new to closed
- Version changed from 3.3 to 3.2.1
Replying to pbearne:
So the Question now is what is it doing?
This is being caused by CCTM::request_filter being hooked into request. This changes the SQL query to include post_type IN ('post') for attachments which obviously breaks:
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_name = 'YOUR_ATTACHMENT' AND wp_posts.post_type IN ('post') ORDER BY wp_posts.post_date DESC
In my testing this also occurs with this plugin and 3.2.1, so it's not a change in 3.3.
Screenshot of settings