• ResolvedModerator Bet Hannon

    (@bethannon1)


    This is not a huge deal, but I’m trying to clean up an error that’s using up server resources. The main site in this network is: churchwebsiteprogram.com, and I am using subdomains with domain mapping. My server logs tell me that “wesleyfresno.org/files/2012/04/Background-tile-widgets.jpg” is showing a 404 error.

    Obviously, this is an older multisite network, that originally used blogs.dir. After having some issues with image uploads, more than a year ago, I worked with a developer to migrate away from ms-files and into the new way of uploading for multi-site. I thought I had all of those issues worked out months and months ago.

    I have checked, and the file exists at: https://wesleyfresno.churchwebsiteprogram.com/wp-content/uploads/sites/26/2012/04/Background-tile-widgets.jpg

    I couldn’t find anywhere in the stylesheet where this file is referenced, so I searched the database. This file is referenced in the table wp_26_postmeta, but only as: 2012/04/Background-tile-widgets.jpg.

    Clearly, somewhere is still supplying the “wesleyfresno.org/files/”

    Will making a network edit to the site in the “Fileupload Url” or “Upload Url Path” override wherever is supplying the old “files” path? Which one should I use, and what should I change it to?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I do not have an answer for you. We are using the “old” version of WP which transparently uses ms-files.php… we will not migrate to the new method.

    I can give you some insight and hopefully you can figure out how to proceed. This is your main site with a url to an image using the new method:
    https://wesleyfresno.churchwebsiteprogram.com/wp-content/uploads/sites/26/2012/04/Background-tile-widgets.jpg

    This is your sub site url using the old method (ms-files.php) which doesnt work anymore:
    wesleyfresno.org/files/2012/04/Background-tile-widgets.jpg

    The sub site url with new method is:
    https://wesleyfresno.org/wp-content/uploads/sites/26/2012/04/Background-tile-widgets.jpg

    I can tell you that ms-files.php uses the subdomain name, wesleyfresno.org, to convert it to the site id which is 26. You can see the site id in the new url but not the old method url.

    We do not use the new method, so I do not know what the data for wp_26_postmeta should look like…I am guessing it would be the full path, /wp-content/uploads/sites/26/2012/04/Background-tile-widgets.jpg, but I am probably wrong. You need to verify by looking at other examples within your site.

    Moderator Bet Hannon

    (@bethannon1)

    The other postmeta tables only have the same relative urls. That’s why I’m wondering if making a change to the site upload paths is the answer.

    Are you sure that url is only in wp_26_postmeta and not in other tables, like wp_26_posts? We have lots of pre-generated asset urls that reside within post|page content. That is one of the reasons I do not want to convert everything to the new url.

    If this is a common nuisance, you could put url re-write rules in .htaccess so that things that use the old url will be redirected to new urls (instead of getting a 404 error).

    Moderator Bet Hannon

    (@bethannon1)

    Thanks for the tip! I searched again, and found in wp_26_posts a full url for “wesleyfresno.org/files/2012/04/Background-tile-widgets.jpg”. I’ve edited this to be the 26/uploads/sites url, so hopefully, that will solve the problem. I’ll check the server logs tomorrow!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image path error’ is closed to new replies.