• Resolved wpmigo

    (@wpmigo)


    Hi there.

    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 outputs something like this:

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

    Any ideas what can be done to solve this issue ?

    Thank you,
    Alex

    https://www.ads-software.com/plugins/nextgen-gallery/

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

    (@photocrati)

    @wpmigo – Although the code snippet looks to be fine (without any additional context) it would probably help to see the issue first hand on your site, do you have a URL where this is happening?

    Thanks!

    – Cais.

    Thread Starter wpmigo

    (@wpmigo)

    Hi Cais.
    Thanks for the reply.
    Check please the info below:

    Page URL:
    https://samolety.org/search/

    Search for ‘Аэрофлот’ and select from the dropdown the given result https://i.imgur.com/l7na8lj.png

    Then click on the first plane: https://i.imgur.com/f3RsV4o.png

    And the result is like this: https://i.imgur.com/08eFo96.png

    Plugin Contributor photocrati

    (@photocrati)

    @wpmigo – Following the suggested method of searching (as indicated in your screen capture) is not working; I’m not getting the list your referred to.

    As to the issue you are pointing out, I would look to your search results template/code to see why it is not parsing the shortcode … without that context I really cannot offer much more as it appears something is short-circuiting the do_shortcode function?!

    – Cais.

    Thread Starter wpmigo

    (@wpmigo)

    If you just copy and paste the ‘Аэрофлот’ in the search field, then you need to delete 1-2 character from the beginning or the end because the search result options are triggered on change.

    And the code that returns the Ajax request does nothing fancy.
    It just outputs a few shortcodes. And other shortcodes are working fine, only the ‘nggallery’ has issues.

    I understand that it is difficult to provide a solution if this is not a common issue and you don’t have access to the code.
    If you need any info that may help you, let me know.


    Alex

    Plugin Contributor photocrati

    (@photocrati)

    @wpmigo – I’m still not able to use your search boxes (and I did use copy&paste prior as well as this round) … https://take.ms/jFY8J … to get to the page where the issue you are describing is.

    The search box to the left side of the screen appears to be trying to run some sort of script but does not change anything on the page whereas the search box at the top right of the screen is returning results but the template being used for those results is not completely rendering. At a minimum, there is no “footer” on that page and without that NextGEN Gallery will not have access to the JavaScript (and CSS) it needs to properly display items.

    Thanks!

    – Cais.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘The nggallery shortcode does not work when loaded via Ajax’ is closed to new replies.