Support » Plugin: Polylang » [Plugin: Polylang] Nextgen gallery plugin conflit

  • Resolved alessiocalvo



    i have a problem with nextgen gallery plugin.
    I not need to translate my gallery, i need to insert by nextgen shortcode button from post panel.

    When i have polylang plugin actived i can’t do that. So, if i try to deactive polylang nextgen gallery works fine.

    What can i do to fix this confict?

    Best regards,

Viewing 11 replies - 1 through 11 (of 11 total)
  • no one?

    Plugin Author Chouby


    I usually don’t use Nextgen Gallery so don’t know this plugin well. But I made a short test and did not see any conflict with the shortcode button

    Nextgen works fine, but non at 100%.
    When i try to insert a gallery in an article or a page from panel,the loading charges at infinity:

    If i deactive polylang plugin nextgen returns to work at 100%.

    Thanks for the help

    Plugin Author Chouby


    I remade the test again and got no issue (Nextgen gallery inserts its shortcode normally). WP 3.4.2 + Polylang 0.9.4 + Nextgen Gallery 1.6.2. No other plugin installed. Have you other plugins installed which could conflict?

    Hi Chouby,
    thank you for your support. I use your same configuration with Nextgen Gallery 1.9.6. I tried to deactive all other plugins to check if the problem come from them, but the issue remain.

    Thank you again,


    Hello Chouby and Alessio.

    I believe I found a possible solution for this conflict.

    The short answer:
    small change on line 243 in /polylang/include/core.php (Polylang 0.9.4)

    //added "empty($_GET['callback'])" check to avoid conflict with NextGen Gallery
    if ( empty($_GET['callback']) && str_replace('www.', '', home_url('/')) == trailingslashit((is_ssl() ? 'https://' : 'http://').str_replace('www.', '', $_SERVER['HTTP_HOST']).str_replace(array('index.php', '?'.$_SERVER['QUERY_STRING']), array('', ''), $_SERVER['REQUEST_URI'])))

    The long answer:
    NextGen Gallery (NGG) makes calls to /index.php?callback=xxx (and some other args).
    This calls are caught by the above redirect and NGG plugin never gets to see it.
    This does not only affects adding a gallery to a post, but also setting a featured image coming from a NGG uploaded picture, and probably some more conflicts.

    I would prefer not to modify /polylang/include/core.php, but maybe Chouby can come up with a better solution.

    I’m using:
    WP Multisite 3.4.2 + Polylang 0.9.4 + Nextgen Gallery 1.9.6

    Chouby, it seems we are using different NGG versions

    Best regards 🙂

    Thank you Gonçalo, the fix works great!

    I added your code and now ngg plugin returns to work.

    Best regards,

    Plugin Author Chouby


    @gonçalo Peres
    Thanks a lot for pointing me in the right direction! Now it is easy for me to reproduce the problem.

    However I chose a different solution to solve the issue. Hopefully, it will work with all query variables added by other plugins (not only for NGG). I would be glad if you could test the development version (

    I read again this: . Hopefully my correction should not break your site with mailchimp, but it would be better to check.

    Sorry, my tests were not complete enough…

    Hi Chouby.

    Downloaded latest development version (
    – NGG working fine.
    – Hitting the homepage with a query string also OK.

    Great job. Thank you 🙂

    Best Regards.

    Plugin Author Chouby


    Thank you for your test 🙂

    Thanks for your job men!

    Now works fine!

    Best regards.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Polylang] Nextgen gallery plugin conflit’ is closed to new replies.