WordPress 2.6 ignores upload preferences

WordPress 2.6 was released only a few days ago, so it isn’t too suprising that there are some bugs.  But this bug seems like it would have been very easy to catch.

From my investigation, it appears that WordPress 2.6 ignores the upload preferences that I have set.  By default WordPress likes to upload files, such as images, into a directory commonly located in /wp-content/uploads/.  From there it creates a hierarchy based on the date you upload a piece of media.

For some reason, I had changed my preferences a while ago to be /wp-content/mobile/photos/ ((Presumably because I thought the only photos I’d uploading using WordPress would have been from my mobile phone.)).  The only problem is now that this setting is ignored, when I want to upload a photo through WordPress’ “Add media” upload tool, it results in a broken image.

This is fairly easy to fix even while I write a post, since I’m able to edit the HTML of the post.  However, WordPress handles each piece of media the same as it would a post to your site.  So there is all types of data stored in the database for each media file uploaded.  Title, description, caption, thumbnail URL, original URL, being some of the metadata that is being stored.  Most of these I can edit through WordPress, some of them I can’t.

Take a look at my photos page.  There is a broken image there, not because the file does not exist, but because WordPress is looking in the wrong spot.  Unless I edit my database manually I will not be able to get that image to display properly.

I’ll do that soon, but I’m hoping someone sees this post that can address the problem for the next release.

Addendum: As db pointed out in the comments, the files are going to the correct locations. It just seems that the reference to the file, being written to the database, is in correct.

Update on July 18: As Simon points out in the comments, this is not necessarily a bug but it is unexpected behavior.  Read his comment for details on how to fix this in your 2.6 install, but it appears it will be “taken care of” in 2.6.1.

About Colin Devroe

Husband, brother, friend, writer, photographer, Jedi Knight and Viddler's Technology Evangelist.
This entry was posted in Notes and tagged , , , . Bookmark the permalink.

5 Responses to WordPress 2.6 ignores upload preferences

  1. I had this problem too. I just went to Settings > Misc then made sure the folder was correct (in my case, /wp-images/, in your case /wp-content/uploads/mobile/) then clicked update. It seemed to work for me. Even if it still says your folder is correctly identified, click update just to re-save it.

  2. Colin Devroe says:

    Chris: Thanks for the tip, but I tried it and it still doesn’t work. Odd.

  3. db says:

    This isn’t a problem I’ve had. And, in checking the photo gallery, everything seems to be ok except for the thumb of Gary V. But the image is there when you click the link and it looks like it’s in the right place.

    I did know a few people to have some weirdness with their wp-admin. I suggested they re-upload the wp-admin directory from the 2.6 install and it cleared up their problems. Might be worth a shot?

  4. Colin Devroe says:

    db: Yeah. It might. I’m willing to do whatever at this point.

    Perhaps I should write a quick addendum to the post.

  5. Simon Lepel says:

    This is not a bug, it’s a wrong setup of your wordpress!
    If you enter an invidual folder for uploads, you also have to enter the full URL to your customized folder in the field below.
    See also WordPress Trac: http://trac.wordpress.org/ticket/7308

    Happy debugging…

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>