Forums

[resolved] Wrong file URL for existing uploaded images (8 posts)

  1. XzanderX
    Member
    Posted 1 year ago #

    So, I've updated my blog to 3.0 and I realized that old posts looked funny. Started digging and found that the URL of the uploaded images was all wrong.

    Instead of being http://www.myblog.com/uploads/year/month/name.jpg older posts has the following URL structure http://www.myblog.com/uploads//.server/user/myblog.com/uploads/year/month/name.jpg

    Anyone got a way to fix that?

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    maybe resetting your upload directory in settings->media

    if the path is correct, just hit save again

  3. XzanderX
    Member
    Posted 1 year ago #

    Thanks for the suggestion, but it didn't do any difference :/

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    hmm....too bad.... well, I guess a search and replace may work?

    Using this plugin
    http://wordpress.org/extend/plugins/search-and-replace/

    replace most of the url.... such as:
    http://www.myblog.com/uploads//.server/user/myblog.com/uploads/year/month/

    with

    http://www.myblog.com/uploads/year/month/

    If the URLs are all wrong in the same manner, that would work....

  5. XzanderX
    Member
    Posted 1 year ago #

    Well the strange thing is that the code isn't in the DB, it's like WP has dabbled with some black magic.

    Looks like I'm not alone thought: http://core.trac.wordpress.org/ticket/12549#comment:23

  6. Are you using multisite?

  7. XzanderX
    Member
    Posted 1 year ago #

    Haha ok, now I'm just confused. I did the search and replace anyway, WP told me that it didn't find anything to change. But now all the old images work again.

    As I said, black magic.

  8. Juscher
    Member
    Posted 1 year ago #

    I have the same issue although I did not upgrade to 3.0 ! My blog is still in 2.9 and I did nothing special. But suddenly today it occured to me that all images dated 27/3/2009 or older have this issue : they are displayed neither in my media library nor in post galleries.

    Their URL contains the site directory path :

    http://www.ready.to.get.free.fr/wp-content//mnt/104/sdb/a/6/www.ready.to.get/wp-content/img_4650.jpg

    Although the URL should be simply like this :

    http://www.ready.to.get.free.fr/wp-content/img_4650.jpg

    An example of broken gallery :

    http://www.ready.to.get.free.fr/index.php/2008/05/un-soleil-estival/

    I checked the database, all is fine. So it is a WP function which is playing wrong.

    I do not remember what happened on the day until which are media are corrupt. Maybe it is the day when I checked the option to organize my media in year/month folders ??

    Anyway, this has nothing to do with WP 3.0 or multi-site.

    So maybe I should try black magic... ;) Or just wait ? :P

Topic Closed

This topic has been closed to new replies.

About this Topic