Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • 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

    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)

    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: https://www.myblog.com/blog.

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

    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

    Thread Starter hakachukai

    (@hakachukai)

    This is not a real fix, but I found a hack that works:

    Edit the following file and comment out line 10 through 16:

    wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/index.php

    `
    10 <!– <?php if (!empty($slideshow_link)): ?>
    11 <div class=”slideshowlink”>
    12 <a href='<?php echo $slideshow_link ?>’><?php echo $slideshow_link_text ?></a>
    13
    14 </div>
    15 <?php endif ?>
    16 –>
    `

    I had the same issue.

    I fixed it by going to: Gallery –> Other Options –> Lightbox Effects –> Javascript URL

    The URL’s for the javascripts were pointing at my domain, but did not include the subdomain. As a result the light box javascript could not be run, so that image just loaded as a regular image.

Viewing 6 replies - 16 through 21 (of 21 total)