• Resolved lilap

    (@lilap)


    Hi, I have found out the cause of the problem for why the thumbs & images are not showing on a Multisite Installation with only a single image directory for all the sites but I do not know how to correct this issue. Here is the situation.

    All my Files and folders have been manually uploaded to a single root directory on my site ie: example.com/media/images/

    I have multiple sites that have different galleries which point to the same image directory ie: example.com, example.com/site2, example.com/site 3.

    The problem is that the thumbnails and images in the gallery is trying to load that site_url ie: example.com/site2/media/images/event/IMG_0000.jpg etc

    I need the plugin to exclude the site_url and only go for the home_url ie: example.com/site2 => example.com/

    I have been looking at the files for the code and just need to know which part of the code I need to change in order to get the home_url instead of the site_url.

    Thanks

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter lilap

    (@lilap)

    Is there any fix for this?

    Edit: Ok so I have an idea as to why this might be happening.

    In my config file, I have this define( 'NGG_IMPORT_ROOT', dirname( __FILE__ ) . '/' );

    Which points to the directory of the current wordpress install or home base? So in this case since it is a multisite installation.

    Where the core files are installed is on http://www.example.com and when multisite is on, all other sites are like this. http://www.example.com/au

    So does that mean, that code I put in wp-config is calling for the directory of http://www.example.com/au since multisite makes it look like this is the Directory name for the multisite?

    Thread Starter lilap

    (@lilap)

    Update: So for anyone who is having the same problems as I am, here is a quick fix until I get something solid from Photocrati.

    Problem: If you have a WP Multisite Installation and have a base folder. EG: lilap.net – Base Site – /images – Base Folder. I did not want to use

    wp-content/blogs.dir/%BLOG_ID%/files/

    as I wanted to use my other ecommerce plugins to locate the files faster etc.

    Problem is when you have a base folder, all subdirectory wordpress sites will start looking for their own files eg: Base – lilap.net, would look for files within lilap.net. lilap.net/site1, would look for files within lilap.net/site1.

    So to get around this, you need to add this to wp-config:

    define( 'NGG_IMPORT_ROOT', '*server to base folder path' );

    Then have a redirect from every multisite you have:

    redirect /site1/images/ http://*your base domain*/images/

    All galleries will now point to your base directory. Hope this helps.

    Thread Starter lilap

    (@lilap)

    Any help on this guys?

    Plugin Contributor photocrati

    (@photocrati)

    @lilap – Thanks for all your troubleshooting and finding a solution that works for your particular setup … I’m not sure what additional help you are looking for though.

    It may not be an ideal solution if that is what you are indicating but the premise behind a Multisite installation is to keep each sub-site separated including the assets the sub-site uses. You appear to be creating a Multisite work-around that NextGEN Gallery is able to now leverage.

    Thanks, again!

    – Cais.

    Thread Starter lilap

    (@lilap)

    Hi Cais,

    I was looking for more of a permanent solution. There must be a oiece of code where instead of “home_url() or site_url()” I can manually changr that to the main site.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multisite URL Problem’ is closed to new replies.