• Resolved zavm

    (@zavm)


    Hello,

    We’ve just updated the Nextgen Gallery plugin from V2.0.66.29 to V2.1.26 and ajax loading has stopped working. The console reports the following error:

    Object {html: "[nggallery id=306 template=thumbs]", overviewHtml: "[nggallery id=306 template=overview]"}
    Uncaught Error: Syntax error, unrecognized expression: [nggallery id=306 template=thumbs]

    Piece of php that returns this:

    // Start forging like the true blacksmith we are.
    	$forgedHtml = array('html'=>do_shortcode('[nggallery id='.$gid.' template=thumbs]'), 'overviewHtml'=>do_shortcode('[nggallery id='.$gid.' template=overview]'));
    
    	// Output galleries
    	return $forgedHtml;

    As far as I can see the shortcodes aren’t being loaded. They are working when going back to V2.0.66.29. I noticed the new version has some old Ajax legacy support removed, but the documentation is says that this should already be removed in V2.0.66.29. Also using the new shortcodes isn’t helping much. They are working when accessing the page directly. So this problem is only when loading a page using Ajax.

    Currently active plugins:
    – Adminimize
    – Advanced Custom Fields
    – Contact form 7
    – Contact form DB
    – NextGEN Custom Fields
    – NextGEN Gallery by Photocrati (this plugin)
    – Search Meter
    – WP Search Suggest
    – Yoast SEO

    Everything is up-to-date, MySQL above 5.0. PHP is above 5.4. php safe mode is off. Theme is our own custom made theme. (not much special)

    Any help here? 🙂

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

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

    (@photocrati)

    @zavm – More than anything else I would suspect the custom templates you are using in the shortcodes are not available … if you have them in a backup then try adding them into the following folder:

    ../wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view

    Thanks!

    – Cais.

    Thread Starter zavm

    (@zavm)

    Hi Cais,

    Thank you for your reply.

    Too bad this is not the problem. I switched the view folder with an older (working) version and it didn’t matter.

    Also, switching something like this wouldn’t matter anyways. We’d like to continue updating the plugin in the future. And doing that everytime would be silly. 🙂 There must be something wrong with the combination of our wordpress and the new Nextgen gallery update.

    Thank you for your help!

    Plugin Contributor photocrati

    (@photocrati)

    @zavm – Have you tried deactivating all of your plugins, clearing your browser cache (and site caches if you are using a caching plugin), then reactivating the NextGEN plugin?

    If this fixes the problem then it was likely one of the deactivated plugins that was causing an issue. Now, retrace your steps activating each plugin and re-checking to see if the problem returns. If it does then that last activated plugin was probably the one. Keep reactivating and in most cases it is also best to keep checking after each plugin, sometimes there may be more than one plugin on a site that will create an issue. If you do find one (or more) plugins causing this problem we would greatly appreciate your feedback on them so the developers may address them as soon as they can.

    Also to note, in rare cases it may be the theme itself that is causing a conflict so while you have just the NextGEN plugin activated you might consider temporarily switching to one of the default WordPress Twenty series themes and see if this corrects the issue as well.

    If the problem still persists after all of this we would still want to know, even more so, as we will still want to sort out the issue and may need additional details.

    Thanks!

    – Cais.

    raz66666

    (@raz66666)

    Who can tell me, why not see the function of wordpress ajax handler in the plugin files?

    Plugin Contributor photocrati

    (@photocrati)

    @raz66666 – 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.

    Hi there.

    We are having the same issue.
    We are using a custom theme without any plugins beside NextGen Gallery, and when trying to load a gallery via Ajax, it outputs the raw shortcode.

    The plugin version is 2.1.46

    The function that proceses the Ajax request returns something like this:

    echo do_shortcode('[nggallery id='.$gallery_id.']');

    Any ideas what can be done to solve this issue ?

    Thank you,
    Alex

    Plugin Contributor photocrati

    (@photocrati)

    @wpmigo – 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.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Ajax loading not working anymore’ is closed to new replies.