WordPress.org

Ready to get started?Download WordPress

Forums

Images Not Viewable in WordPress 2.6.2 (11 posts)

  1. deuts
    Member
    Posted 5 years ago #

    I recently upgraded my wordpress intallation to 2.6.2, and guess what I've found out. My uploaded pictures, even those prior to the upgrade, are nowhere to be seen. Ex:

    http://www.deuts.net/archives/2008/back-to-back-surigao-and-palawan.html .

    Moving on, going to the actual jpg location returns a 404 page. Ex:

    http://www.deuts.net/wp-content/uploads/2008/09/butuan-city.jpg

    Note: I used the wordpress automatic upgrade plugin when I upgraded my installation. Not sure, maybe this has a bearing somehow.

    Somebody help please.

  2. dinzan
    Member
    Posted 5 years ago #

    did u check if the permalink structure has changed ?

  3. deuts
    Member
    Posted 5 years ago #

    Yup. And that is exactly how they appear in the file structure inside my wordpress installation directory.

  4. moshu
    Member
    Posted 5 years ago #

    There must be a reason helpers always tell you don't use those automatic gizmos.

    So, if you look at your server via FTP, are the images still there in the proper folders?

  5. deuts
    Member
    Posted 5 years ago #

    Yeah, they are there intact. It's only that they are not viewable directly via web browser. They return a 404.

    Also in the media files under the "Manage" Section, the files are there but no small thumbnails. Note: these are images uploaded even before the upgrade.

  6. moshu
    Member
    Posted 5 years ago #

    Permissions on those folders? (just shooting in the dark)
    Changing/resetting permalinks?

    On a second thought:
    This dir has content - http://www.deuts.net/wp-content/uploads/2008/03/
    This one is empty - http://www.deuts.net/wp-content/uploads/2008/09/

    So, now I am wondering WHAT are you seeing there when using FTP?

  7. deuts
    Member
    Posted 5 years ago #

    Both directories have jpg files in them, including the /2008/03/ only that the 2008/09/ have no other non-jpeg files. It means it's returning non-jpg files but not the jpg ones.

    I actually have some leads here. It appears that the wordpress automatic upgrade plugin is the culprit. I've just deactivated the plugin and the images inside my stylesheet is not showing up anymore. Will try to reinstall manually and get back to on this issue.

    Thanks for the help.

  8. deuts
    Member
    Posted 5 years ago #

    Yup, it was the WPAU that was the culprit (I'm not going to use that plugin ever again). To prove that, here what I did:

    • Disabled the plugin (WPAU) and deleted the folder and other folders and files created by such

      result: same problem

    • Downloaded WP2.6.2 and manually reinstalled in my current installation

      Result: same problem, couldn't see the images.

    • Went back to the 2.6 back-up i had (before running the WPAU script), switched it to the current directory and run

      Result: Everything seems went fine. I could already see my images. Some files were missing (of course) from my last upload after I upgraded to 2.6.2 by WPAU, so I just had to re-upload them.

      At first, one might think that WordPress 2.6.2 must be the culprit, but watch out for the next step.

    • Now, upgrade manually

      Result: Everything's fine.

    Scary steps heh. Good thing I had back up copies.

  9. deuts
    Member
    Posted 5 years ago #

    Investigating further, I noticed these lines in my .htaccess after the upgrade using the wordpress automatic upgrade plugin:

    RewriteCond %{HTTP_REFERER} !^http://allsubdomains.deuts.net$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]

    Multiply the first line with the number of domains and subdomains I had in my shared host (change the "allsubdomains"). There were more than 100 lines like that (the first line).

    Somebody please explain what does this mean?

    Thanks.

  10. moshu
    Member
    Posted 5 years ago #

    That was probably some kind of hotlink-prevention rules... obviously done in the wrong way.
    Good reading:
    http://www.zann-marketing.com/developer/20050713/stop-image-hotlinking-using-htaccess.html

  11. deuts
    Member
    Posted 5 years ago #

    Uh-oh. My bad. Please forgive me for pointing fingers, when I should point my finger to me. It was not WordPress 2.6.2's fault. It was not WPAU's fault. It was my fault. I enabled the hotlink protection from the control panel the other day. And now my site is in a mess.

Topic Closed

This topic has been closed to new replies.

About this Topic