• Resolved mediadisconnect

    (@mediadisconnect)


    I have searched the forum to find an answer but could not find one so I am posting a new thread.

    I am running WordPress 3.3.1 in a Multisite sub-directory configuration using Domain Mapping. My .htaccess file is proper(copied from network setup) and Apache is set to AllowOverride All.

    When I add media from one of the sites, the file gets uploaded and thumbnails are created in the proper directory (blogs.dir/4/files/04/2012/) but when looking at the media record the thumbnails are blank and the Filename URL is incorrect.

    FileName URL = http://domain.com/files/2012/04/IMG_0763.jpg
    The displayed URL produces a 404 error.

    If I browse to http://domain.com/wp-content/blogs.dir/4/files/2012/04/IMG_0763.jpg the file shows up properly.

    Inside the Sites settings:
    Upload Path: wp-content/blogs.dir/4/files
    Fileupload URL: domain.com/files
    Upload URL Path: blank

    I really am at a loss and have been working on this for about four days now. Everything else is working properly except for the adding of media.

Viewing 15 replies - 1 through 15 (of 27 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Does it do this on ALL subsites, or just the one?

    Did the images work when the site was NOT mapped? (You did check, right?)

    Thread Starter mediadisconnect

    (@mediadisconnect)

    This happens on all subsites.

    The uploading of images works perfect on the site that is not mapped.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    The uploading of images works perfect on the site that is not mapped.

    Do you have any subsites that are NOT mapped? I just want to be sure you mean ‘My main domain, the original one I did not and cannot map, is fine. My subdomains, like domain.com/foo/, AND my mapped domains, like otherdomain.com, all fail.’

    It does matter πŸ™‚

    Thread Starter mediadisconnect

    (@mediadisconnect)

    My original installation of WordPress was to domain.com

    I converted the WordPress installation to Multisite using subdirectories:

    domain.com/SubSite1
    domain.com/SubSite2

    I then mapped domain2.com to /SubSite1
    and domain3.com /SubSite2

    If I upload through WordPress on domain.com my thumbnails show up and path is correct for inserting into posts, pages, etc.

    If I upload through WordPress on either domain2.com or domain3.com non of my thumbnails show up and the File URL produces a 404.

    Thread Starter mediadisconnect

    (@mediadisconnect)

    The only domain that does not have mapping designated is from my initial install domain.com at /

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    So no, you don’t have any subsites that aren’t mapped.

    Can you make one just for a quick test? It’s either ALL subsites aren’t getting images, or it’s only mapped domains.

    Thread Starter mediadisconnect

    (@mediadisconnect)

    Ok, when I create a test site and don’t map the domain, picture uploading words great.

    It appears that only those subsites that are mapped are having the problem.

    The Domain mapping plugin that I am using is WordPress MU Domain Mapping v0.5.4.2 by Donncha O Caoimh

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Do you happen to have hotlink protection in your .htaccess?

    Thread Starter mediadisconnect

    (@mediadisconnect)

    I don’t have hotlink protection enabled.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Double check that your server doesn’t have it secretly enabled? Cpanel has a setting for it, IIRC.

    Are you using any caching plugins?

    Thread Starter mediadisconnect

    (@mediadisconnect)

    It is not secretly enabled. lol
    I double checked with the hosting company (Blue Host).

    I had a Caching plugin installed but I removed it completely a few months back when I noticed that it wasn’t helping with my load times.

    If it helps I am posting my .htaccess file. I have had it two ways but neither have worked.

    ***** Original *******
    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php
    
    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    ******END OF ORIGINAL VERSION*****************
    ****** Second version*******
    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
    ***** END OF SECOND VERSION *******

    I don’t want to impose but if you would like access to my hosting account and WordPress installation I would be happy to provide it.

    Thread Starter mediadisconnect

    (@mediadisconnect)

    I am sure the solution is something that has either been over looked or something I am not aware of.

    Thread Starter mediadisconnect

    (@mediadisconnect)

    I am not sure if this matters but when looking at the MySQL tables almost all of my tables use a collation of utf8_general_ci

    where both the wp_domain_mapping and wp_domain_mapping_logins tables use a collation of latin1_swedish_ci

    Again not sure if that really matters but I am grasping at straws.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    That shouldn’t matter, but … A quick check and all mine are utf8_general_ci

    If you’ve got PHPMyAdmin, pop open the DB and go to the “Operations” tab. Change ” Collation:” to utf8 (which is ‘better’)

    How did you ‘map’ the domains outside of WP>?

    Also on domain.com/wp-admin/network/settings.php?page=dm_admin_page

    What ‘Domain Options’ did you check?

    Thread Starter mediadisconnect

    (@mediadisconnect)

    Changing the collation to utf8_general_ci did not work.

    In my cpanel I have the domains parked at Bluehost who is also my registrar. I have an A record setup that points to the IP address of my server with the IP address entered on the domain mapping configuration page.

    I have domain options 1-4 enabled and 5 disabled.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Media Upload File URL incorrect’ is closed to new replies.