The MU forums have moved to WordPress.org

All uploaded images not displaying (25 posts)

  1. kgraeme
    Member
    Posted 13 years ago #

    This is something I've seen in the forums a few times before with no apparent solutions, but maybe folks can throw out some troubleshooting ideas.

    On my staging server, all uploaded images in all blogs are failing to display. They were working recently and today they're not.

    Appears quite similar to this ticket http://trac.mu.wordpress.org/ticket/1077 but the solution found there isn't my problem.

    Checked:

    • The .htaccess is fine.
    • The wp-config.php is fine.
    • The blogs.php is fine.
    • Theme images load fine, just files uploaded to blogs.dir are the problem.
    • Permissions of the folder and files in blogs.dir are fine. (We use 644 but changing to 777 doesn't change anything.)
    • Other files in blogs.dir are fine. MP3 and PDF files load fine. Just images like jpg, gif, png won't load.
    • Log files show 200 (OK) for the files
    • When going to the blogs.dir path (http://domain/wp-content/blogs.dir/4/files/2009/10/test.jpg) instead of the rendered path I get a 404.
    • Other MU installs on the same server are fine.
    • Rolled back to a known good version of our config with SVN, so that should rule out new plugins or other code changes.

    Any other thoughts of what to check? A google search finds people posting with this problem, but no solutions.

    Thankfully it's just on our staging server, but it's staging for a production release and I'd rather know what's going on than push something wrong to production.

  2. mercime
    Member
    Posted 13 years ago #

    My 2cents.
    - could it be a change in the theme itself? Maybe someone tweaked it and forgot to close image tag or played with style.css? if you change to default or classic theme, do the images show up?
    - could it be that the images were physically deleted from the blogs.dir/4/files/? are they still there?

  3. kgraeme
    Member
    Posted 13 years ago #

    Happens with all themes (and I'm the one that does the themes). All the files are physically there. I checked that right away.

  4. mercime
    Member
    Posted 13 years ago #

    Quite a mystery there kgraeme. One more check: export the XML file of at least one blog with image failure to get a clue about where the suppression of image display is coming from. Do you see the links to the image attachments in respective posts or pages in the XML export?

  5. DeannaS
    Member
    Posted 13 years ago #

    Here's another part of the mystery. Feeds are broken, too. If you append /feed/ to the end of a blog url, you just get dumped to index.php.

    That says to me that something is going on with the "generate_rewrite_rules" function...but I'm still not sure what.

  6. kgraeme
    Member
    Posted 13 years ago #

    @mercime Yes, the image attachments are in the xml.

  7. mercime
    Member
    Posted 13 years ago #

    Ok, that's a big relief, great. If that's the case, if you look at the source code of the page/post with the missing image, you would see the link to the image generated like so (or without link tag) right?

    <a href="http://example.com/files/2003/01/013103-012.jpg" etc etc>
    <img src="http://example.com/files/2003/01/013103-01-500x375.jpg" alt="013103-01" width="500" height="375" class="alignnone size-large wp-image-14" />
    </a>

    Run Settings > Permalinks to "jog" the system.

  8. kgraeme
    Member
    Posted 13 years ago #

    I had already tried resetting the permalinks. Should have added that to my list.

    It really looks like a global rewrites problem, but only for uploaded images. Other attachement types are fine.

    Edit: oh, and for feeds as Deanna mentioned.

  9. mercime
    Member
    Posted 13 years ago #

    just curious whether you've solved "The Mystery of the Missing Images" ...
    - some more basic ideas here :-) have you tried re-uploading WPMU files and folders? Or, did you make changes to core files that precludes you from doing so or might have affected the images like media.php in wp-includes or wp-settings.php in root?

  10. kgraeme
    Member
    Posted 13 years ago #

    No. It's still borked. :(

    A full reload is probably our next step. As I mentioned, we manage our deployment through svn and I did an svn switch of the code to a previously tagged config that is working fine on 3 other installs, so any changed files should have been either replaced or flagged as conflicts.

    Part of me wants to just make it work, reasons be damned. But part of me wants to know WHY it broke because I've seen this question (bug?) crop up here occasionally.

  11. kgraeme
    Member
    Posted 13 years ago #

    Tiny progress. Deleting EVERYTHING other than blogs.dir makes the file load correctly when the full path is entered. So the vhost is definitely working right.

  12. kgraeme
    Member
    Posted 13 years ago #

    Fixed. We pointed the vhost to a new directory path, did a clean install, entering the existing DB information into the setup so that it would pick up the existing db, copied over the blogs.dir and it worked. Downloaded the whole kit and kaboodle from both and did a diff. Out of over 6,700 files only two were different:

    .htaccess and wp-config.php

    And the only differences that I can find were linebreaks. Which is really frustrating because that's something I looked at early on. Even pulled fresh versions from our SVN repository.

    But it's fixed now, and the lesson is: you can troubleshoot everything under the sun, even knowing what to look for, and sometimes a clean install over the db is the fix it needs.

  13. mercime
    Member
    Posted 13 years ago #

    Cheers kgraeme :-)

  14. supernovia
    Member
    Posted 13 years ago #

    Hey there - I've got the same issue here on an mu installation we did on the 17th. We really hadn't modified very much at this point .. only the CSS really. I'm going to check those two files to see if I can see anything strange.

  15. Abigail2010
    Member
    Posted 13 years ago #

    I am new to this but I am having the same problem.

    I installed 2.8.4 and up loaded 3 themes. Could not see any images in any of them.

    So I found these messages and reistalled 2.8.4. Still no images.

    So I installed 2.9.1. Still no images.

    Any suggestions?

    Thanks!

  16. DeannaS
    Member
    Posted 13 years ago #

    Abigail - if you installed 2.9.1, then you're not using wpmu.

  17. sigfrid76
    Member
    Posted 13 years ago #

    I have the same problem that shows me pictures, and I installed the version 2.9.1.1. if anyone can help me, and relinstale all over again and nothing ..

  18. MKRob
    Member
    Posted 12 years ago #

    I've tried upload loading pictures to the media gallery in a post and normally when it uploads completely, there's a small thumbnail on the left side that shows the picture. Only today, I tried to upload a picture and it went through, but the thumbnail does not show up. I tried adding it to the post anyway and the picture size comes up, but no picture shows, all that shows up in the thumbnail and post is the size of the picture with a little note icon and a red X on it. I tried it on a seperate website because i thought it may be a server issue, but it worked fine on that website. Which tells me there's a wordpress issue. I haven't changed anything in my settings, I just woke up this morning and the pictures wouldn't upload. I've read many forums about this issue and alot of them said that they've been getting this recently and it ended up being a wordpress issue with the path to the Wordpress Image Uploader, is there anyway I can fix this?

    Thanks,

    MKRob

  19. gmax21
    Member
    Posted 12 years ago #

    Are you running phpsuexec or suPHP on your server?

    If so then check your file permissions 644 for files, 755 for directories.

    It could be the problem that "user" does not have correct access.

    Also if you run the server and it has something like cPanel/whm and you uploaded with the root account you may need to change the file ownership from root the cpanel account owner.

  20. balukorrapati
    Member
    Posted 12 years ago #

    Hi All,

    I have same problem.

    I have migrated my company site from WP to WPMU. I have created only one blog.

    The existing images are not showing.

    I have installed buddypress also. Avatars are not working. I have seen the upload images in wp-content/blogs.dir/1/files through FTP. So, files are uploading perfectly. But I am seeing file path as files/image.gif

    I have removed .htaccess file for some reason. Currently I have renamed htaccess.dist to .htaccess.

    I am using Godaddy share hosting with Windows.

    Please help me to resolve the issue.

    Please help

  21. marpa
    Member
    Posted 12 years ago #

    Having the same problem in a number of different instances of wpmu including 2.9.2 and 3.0. I think problem were the results up updates.

    New images upload to blogs.dir fine, permission of newer images same as permissions of older images, but url's to the newer images do not display the image whereas urls to the older images do display the image...

    How can this be?

  22. andrea_r
    Moderator
    Posted 12 years ago #

    Did you change the rewrite rule in the htaccess file as directed?

  23. marpa
    Member
    Posted 12 years ago #

    Yes, the only difference between my .htaccess file and the htaccess-dist is the value of the RewriteBase:

    htaccess-dist
    RewriteBase BASE/

    .htaccess
    RewriteBase /<<path-to-wordpress-codebase>>/

  24. andrea_r
    Moderator
    Posted 12 years ago #

    No, I mean when you upgraded from WPMU 2.9.2 to 3.0, you were prompted in the backend to make a change to one of the rewrite rules. Did you do that? It directly affects image retrieval.

  25. marpa
    Member
    Posted 12 years ago #

    Problems with image retrieval in all instances of WordPress I was using (2.9.2 and 3.0) were related to .htaccess files. In some cases, I had been updating these manually.

    When I started using WP 3.0, I don't recall being prompted to update rewrite rules but I began testing it before it was released.

    Thanks for your help.

About this Topic