• Resolved WordPress Fan

    (@wordpress-fan)


    Hi there,

    After updating my NextGEN plugin, my Gallery preview thumbnail images no longer link to view the whole Gallery. On click of a Gallery thumbnail, it stays on the same page, so the link appears broken.

    WordPress & NextGEN are up to date. Updated from NextGEN V1.9.12 to 2.0.79

    See here the website here: photo-gallery

    A fix I have tried: Manage Gallery > open an individual Gallery > Create a new page, and then Link to that page. This worked, however I have 30 Galleries and will add more, so this is not an ideal solution to set up new sub pages for over 30 Galleries.

    Also, since upgrade all photos inside manage gallery say – January 1, 1970.

    Any suggestions on how I can try to resolve these issues would be much appreciated! Many thanks.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @wordpress Fan – We’ve found recently that some users have been negatively affected by a change in 2.0.67+ in how we handled image filename escaping in URLs. We currently encode spaces as a + which is the RFC-standard since 2005, but it’s come up that some users have misconfigured servers that can’t handle this change. We’ve added a filter to our get_image_url() method that can be used to alter the results to their original format (using %20 instead of + for space characters) using the following code, just drop it into the functions.php:

    add_filter('ngg_get_image_url', 'ngg_replace_plus_with_percenttwenty', 10, 3);
    function ngg_replace_plus_with_percenttwenty($url, $image, $size) {
        return str_replace('+', '%20', $url);
    }

    You can also comment out the following line from function nextgen_esc_url() in nggallery.php as first alternative:

    $url = str_replace( '%', '%25', $url );

    Thanks!

    – Cais.

    Thread Starter WordPress Fan

    (@wordpress-fan)

    Hi Cais,

    Thanks for your advice, I really appreciate your support. What you explained makes sense and I thought this is the cause of the problem.

    But unfortunately I put the first code I put in my own functions.php file and it made no difference.

    The second option to comment out that line was in your plugin file and when I tested the link was still broken. The url became very long with a bunch of figures like this: %25252525e2%2525252580%25252525a2 and it still stays on the same page.

    Any further suggestions on this? Many thanks 🙂

    Plugin Contributor photocrati

    (@photocrati)

    @wordpress Fan – The new broken URL containing the multiple encoded percentage signs is something we have not seen before and the recommendations I suggested if applied correctly should not have created this problem.

    I would suggest starting with reverting the changes you have made then sending us a Bug Report (http://nextgen-gallery.com/report-bug/ … please reference this topic) so we can get a look under the page.

    We will need log in and FTP credentials for your WordPress installation, please include those with your Bug Report, too.

    Thanks!

    – Cais.

    Thread Starter WordPress Fan

    (@wordpress-fan)

    Okay, thanks for your help Cais, much appreciated.

    Thread Starter WordPress Fan

    (@wordpress-fan)

    Hi again Cais,

    Problem is resolved now.

    I added your code into my functions file and I figured out it was just one gallery left not working. After clicking on the problem gallery, the url got stuck and the other galleries did not work. The other galleries did work however, if they were clicked on first. So I knew the problem was with one particular gallery – I worked out that was because there was a bullet point dot within the gallery name, and therefore creating the weird url %25%25 stuff.

    I tried removing the bullet point, changed the gallery name, changed the gallery path option, cleared cache, logged out and back in etc and the gallery url did not update.

    So I logged into php Myadmin and saw in the database that the slug was still on the old url, so I edited it problem solved. Hope this solution can help others!

    Thanks again

    Plugin Contributor photocrati

    (@photocrati)

    @wordpress Fan – Thanks for sharing!

    – Cais.

    Followup report of a similar problem : picture and thumb links are broken in gallery management 2.0.79. Broken links show plusses (+) instead of spaces in the picture file name « xx+yy.jpg » instead of « xx yy.jpg ». The pictures are displayed correctly in the blog pages but no more possible changes.

    I tried the suggested Cais workarounds : comment line in plugin code does nothing and filter add in wp-includes/functions.php yields a mod_fcgid: stderr: PHP Fatal error: Call to undefined function add_filter(), which I am not knowledgeable enough to fix.

    Any help would be greatly appreciated

    WP 4.0.4 , Twenty Eleven 2.0, nggallery 2.0.79, French, 561 pictures, 56 galleries.

    Plugin Contributor photocrati

    (@photocrati)

    @avu – Please start your own topic so we can try to help you with your specific issue on your specific site.

    See http://codex.wordpress.org/Forum_Welcome#Where_To_Post

    Thanks!

    – Cais.

    PS: add_filter() is a core WordPress function, if you are seeing Fatal errors to the effect you noted there may be more going on outside of any issues with NextGEN Gallery.

    Thanks Cais, no need to start a new topic.

    The gallery management works again after applying your both workarounds :
    – the filter (to “drop” into the plugin functions.php and not in the WP core functions.php …) corrects the thumbs links
    – the commented line in nggallery.php corrects the picture links

    A future permanent fix would be nice for our server environment : basic shared Linux web hosting and ubuntu 14.04 LT for tests.

    Thanks again

    Plugin Contributor photocrati

    (@photocrati)

    @avu – For the most part, at least we suspect most if not all server environments, the upcoming release with these work-arounds already implemented should continue to keep this sorted out.

    Thanks!

    – Cais.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Thumbnail links to open Galleries are broken after update’ is closed to new replies.