WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
[resolved] Nextgen gallery plugin conflit (12 posts)

  1. alessiocalvo
    Member
    Posted 1 year ago #

    Hello,

    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,
    alessio

    http://wordpress.org/extend/plugins/polylang/

  2. alessiocalvo
    Member
    Posted 1 year ago #

    no one?

  3. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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

  4. alessiocalvo
    Member
    Posted 1 year ago #

    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:

    http://s16.postimage.org/hhlsrbmc5/image.jpg

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

    Thanks for the help

  5. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    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?

  6. alessiocalvo
    Member
    Posted 1 year ago #

    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,

    Alessio

  7. Gonçalo Peres
    Member
    Posted 1 year ago #

    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'])))
    			$this->home_requested();
    (...)

    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 :)

  8. alessiocalvo
    Member
    Posted 1 year ago #

    Thank you Gonçalo, the fix works great!

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

    Best regards,
    Alessio

  9. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    @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 (0.9.4.4).
    http://wordpress.org/extend/plugins/polylang/

    I read again this: http://wordpress.org/support/topic/plugin-polylang-language-homepage-redirection-problem-and-solution-but-incomplete?replies=5#post-2729566 . Hopefully my correction should not break your site with mailchimp, but it would be better to check.

    @alessiocalvo
    Sorry, my tests were not complete enough...

  10. Gonçalo Peres
    Member
    Posted 1 year ago #

    Hi Chouby.

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

    Great job. Thank you :)

    Best Regards.

  11. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for your test :)

  12. alessiocalvo
    Member
    Posted 1 year ago #

    Thanks for your job men!

    Now works fine!

    Best regards.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags