• It works ok if you use it completely normally, but if your site is hosted anywhere but /var/www it breaks.

    It also breaks if your site uses a subdomain “blog.domain.com” or uses directories in the URL “domain.com/blog”

    WordPress has options for setting these values, but NextGen is not using them.

    I ended up having to do a mysql dump and hack all of the hard coded values with new correct ones to get it to work :-/

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter hakachukai

    (@hakachukai)

    Here are the hacks that you can do to make it work. In this case I was moving from a subdomain / virtual host setup to simple regular domain/subdirectory setup.

    In this example I am switching from blog.mydomain.info to mydomain.info/blog

    The hosted files were moved from /var/blog to /var/www/blog

    ———————————-

    Do a mysql backup (I won’t explain that here)

    mysqldump -u root -p wordpress > wordpress.sql

    Changing domain locations

    sed -i ‘s/$OLD_DOMAIN/$NEW_DOMAIN\/$DIRECTORY/g’ wordpress.sql
    sed -i ‘s/blog.mydomain.info/mydomain.info\/blog/g’ wordpress.sql

    Changing docoument roots
    sed -i ‘s/\/var\/blog/\/var\/www\/blog/g’ wordpress.sql

    Then manually fix NextGen gallery plugin using WordPress:

    Goto Gallery–> Other Options –> Lightbox Effect –> advanced setting –> javascript locations
    Set them manually to the correct domain / directory

    Hope that helps someone out there till they fix this

    Plugin Contributor photocrati

    (@photocrati)

    @hakachuai: Just FYI, I’m passing this over to the developers for review.

    Plugin Contributor photocrati

    (@photocrati)

    Just another note: we actually test widely on subfolder installs and we’ve tested successfully on subdomain installs. We did, I think, have some issues when the site url and wordpress url were different (ie, WP is installed in domain.com/wp but served from domain.com). In any case, we want to hunt down and fix any issues we might have related to these, so I appreciate the in-depth feedback and I will pass it on. Thanks.

    Thread Starter hakachukai

    (@hakachukai)

    No problem. I can even tell you what specifically broke:

    The thumbnails broke. They didn’t show up in the blog post. The reason for this is because they are loaded by text in the post. When your domain changes, the text in the post does not. So the thumbnails break.

    While editing a post, clicking the Add NextGen element button broke.
    The reason for this was because it was trying to load php files from /var/www (which was not the Document Root of my site).

    Light box failed to load because the domain info for where to find the java scripts had to be manually changed.

    Once light box did work, the arrow icons would not appear on the sides of the pics ( the ones you click to scroll to the next pic ). I’m assuming this is either a domain or a wrong document root issue.

    ——————————————

    More details of my scenario

    I installed the plugin only once, using default Document Root and a completely vanilla domain setup (www.myblog.com).

    Then I moved my site to a non-standard Document Root ( /var/blog ) and switched to a domain like this: http://www.myblog.com/blog.

    I did not remove or re-install the NextGen plugin, I just kept the original installation.

    Thread Starter hakachukai

    (@hakachukai)

    I found another breakage.

    Adding galleries fails because it tries to use [Document Root]/wp-content/gallery

    This will fail if your site is in a sub directory ( like mine is ).

    I fixed it by changing one piece of this giant JSON object that I found in mySQL here:

    select * from wp_options where option_name= “ngg_options”;

    Before:
    s:11:\”gallerypath\”;s:19:\”wp-content/gallery/\

    After:
    s:11:\”gallerypath\”;s:19:\”blog/wp-content/gallery/\

    Now it works

    Thread Starter hakachukai

    (@hakachukai)

    I found this extremely helpful. It quickly give yous a humanly readable list of a lot of the fields that NextGen uses. If you change them in the database, don’t forget to properly update the preceeding JSON object number. It needs to know how big the “piece” of data is.

    mysql –skip-column-names -s -u root -p wordpress -e “select option_value from wp_options where option_name=\”ngg_options\”” | sed ‘s/;/\n/g’ | less

    I believe you can change this ngg_options setting for the gallery path under the OTHER SETTINGS tab on the dashboard. I have changed this as you mentioned above and it has not fixed the issue.

    Unless I have the wordpress install directory and site url identical NGG will not work.

    Any other ideas here…?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘NextGen V2.0.7 breaks if you move it’ is closed to new replies.