WPMU DEV Members receive personal, comprehensive and timely support and assistance from experienced WPMU and BuddyPress developers.

Helping beginners and advanced users since 2005
Join WPMU DEV Today
And transform your WPMU or BuddyPress site
Includes Unlimited Access to:

Private Members
Only Forum

Live Chat Help
and Support

Comprehensive
"How To" Videos

WPMU and BuddyPress
Manuals and More

Uploaded images problem after 2.8.1 upgrade

Just upgraded to 2.8.1 on my test server, and now have an issue with images that were/are uploaded to the media library not appearing.

Prior to the upgrade, images that were uploaded to the media library (either via the admin, or the WYSIWYG tool) would be called via the path:

http://sub1.mydomain.com/files/2009/07/myimage.jpg

After the upgrade, no existing images are displaying, nor are images that I've uploaded since the upgrade.The record for the images exists, but there is no way to view the image.

It appears that after the upgrade the path being used by WPMU is no longer pointing to the actual location of the files which appears to be in wp-content/blogs.dir/1/files (or /2/files, /3/files, etc.)

Any thoughts or tips?

Help & Support from WPMU Dev members and staff

Sounds a little odd - there are some bugs with 2.8.1 but I didn't know that this was one.

A link to an example Page or Post where the missing images can be seen would be a plus.

We're not seeing it. SVN'ed out 1883 this morning from 187-something. Haven't heard anything.

Another post (blogs.dir images not appearing and article links 404) seems to address a similar problem, so I checked my .htaccess file, which seems fine - didn't change since upgrading to 2.8.1.

As mentioned before, images that are uploaded are landing in the correct directories (wp-content/blogs.dir/1/files,/2/files, /3/files, etc.) but when the system tries to call them via the path sub1.mydomain.com/files/2009/07/myimage.jpg - nothing.

The htaccess file does contain the following line, which seems to deal with paths for uploaded images:

<br />
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]<br />

I don't know enough about how the htaccess file works with WPMU to determine if there is a change needed here, but it appears it might be a place to start.

Attached is a screenshot from the Media Library admin panel that shows how images are just not displaying.

When I view source, the code shows that it is rendering the IMG tag...

<table class="slidetoggle describe form-table"><br />
		<thead class="media-item-info"></p>
<p>		<tr><br />
			<td class="A1B1" rowspan="4"><img class="thumbnail" src="http://test.airfoil.net/files/2009/05/testimage.jpg" alt=""></td><br />
			<td>testimage.jpg</td><br />
		</tr><br />
		<tr><td>image/jpeg</td></tr><br />
		<tr><td>2009-06-08 10:14:57</td></tr><br />
		<tr><td></td></tr></p>
<p>		</thead>

...but the image doesn't display. If I type the path directly into a browser, I get a 404.

So, it seems that WPMU is no longer translating "http://test.airfoil.net/files/" to the directory "blogs.dir/1/files" - resulting in it not finding the image.

[attachments are only viewable by logged in members]

Hiya,

If I type the path directly into a browser, I get a 404.

That means the .htaccess file isn't doing it's job for some reason. Ask your host to take a look. Maybe they can spot the problem.

Thanks,
Andrew

@airfoil ...If I may ask, did you resolve this problem? I'm having the same problem, except intsead of a 404, I just get an empty image placeholder in IE. Thanks

Hi,

THere is a solution for this?, I´m having the same problem :(

Hiya,

Make sure your .htaccess file is intact. Also check the permissions on blogs.dir.

Thanks,
Andrew

Hi Andrew,

My .httaccess file have this:


RewriteEngine On
RewriteBase BASE/

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

I haven´t changed since the instalation. and the blogs.dir have 777.

BTW. This happend when I choose a new permalink structure.
/%year%/%monthnum%/%postname%/
Also checking the blog configuration I see this:
Upload file: files
Fileupload URL: http://blogs.mydomain.com/files

Any idea!? :(

Thanx.

Hiya,

You need to change this line:

RewriteBase BASE/

To this:

RewriteBase /

Thanks,
Andrew

Reply

You must log in to post.

To post your questions, and access all of our plugins, themes and support - become a member today.