Hi n8v,
This forum is the correct place to report errors, and thanks for your report.
I’m not able to reproduce the 404 errors running the same setup you mentioned. Both those images load fine in my testing. P2 loads /wp-admin/includes/media.php directly, so the image paths should work fine as defined by default.
Thread Starter
n8v
(@n8v)
hmmm… you went to the homepage of a p2-themed blog,
clicked on the “add image” icon on the new post form (html id = add_image), and got the thickbox “popup” with a working close icon (tb_close.png) in the upper right?
Affirmative. No 404 errors reported in Firebug using the “Net” tab to track images loading on the page.
I’m having the same error in all my p2 installations.
I’m using the latest version 1.2.3
The icons for media upload point to the wrong link.Let me elaborate on this:
If my blog is at: http://mydomain.com/blog
The media upload should point to: http://mydomain.com/blog/wp-admin/includes/media.php
But instead it goes to: http://mydomain.com/blog/blog/wp-admin/includes/media.php
Giving then a 404 error because of the duplicated “blog/” in the link.
How can I fix that?
Same error for me.
The problem is an extra /wordpress/ in the path
(like the extra /blog/ on webjac’s installs)
How to fix?
I’m trying to solve this problem.
For the moment i can change the first link when you click.
But then for the upload it still don’t works …
In the p2.php
function admin_url( $path ) {
return $path;
// ANCIEN LIEN DE BASE
//return P2::url_filter( admin_url( $path, 'http' ) );
}
function make_media_urls( $string ) {
// This line does not work in .org
return str_replace( 'media-upload.php?', P2::admin_url( '/inside-ajilon/wordpress/wp-admin/media-upload.php?p2-upload=true&' ), $string );
// ANCIEN LIEN DE BASE
//return str_replace( 'media-upload.php?', P2::admin_url( '/media-upload.php?p2-upload=true&' ), $string );
}
[Please post code snippets between backticks or use the code button.]
same problem Upload/Insert <a href=”http://tap2post.com/dt/dt/
where’s that extra /dt coming from 🙁
This is 90% solved:
I know this is a hack, but commenting out line 66 of p2/inc/p2.php fixes the problem for us.
http://ww.wp.xz.cn/support/topic/p2-123-clicking-add-media-opens-up-error-page?replies=5#post-1992957
Changing site name solves this for the media uploaded, but I’m having the same problem elsewhere (for instance, on the image for the close box on the media uploader) even with that fix. Note that in my case the WP install is more than one directory level deep.
We covered this a few week back on our blog, http://www.catonthecouch.com/blog.
Best of luck