• Resolved dimmex

    (@dimmex)


    Hi!

    There is a conflict between WPML Multilingual CMS and Nextgen Gallery plugins. When they work together they break permanent links. That is, when they work together, pages become available at two url: site.com/?page_id=1213 and site.com/page.

    Tried different combinations of plugins on my site and only the one named creates the problem. As a result, there are duplicate pages and the site loses position in Google. Can anything be done about it?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Jaime Segura

    (@jaimeimagely)

    Hi @dimmex,

    1 OK, just to make sure I understand the issue, if you have either NextGEN Gallery or WPML on their own, your permalinks work fine, only the defined URL works, as soon as you have BOTH plugins (hopefully you tried this with no other plugins active) the issue triggers. Right?

    2 You can try using canonical, Google Search Console exclude crawling by URL parameters and/or maybe sitemaps.

    Please keep me posted.

    Thread Starter dimmex

    (@dimmex)

    Yes, you understand correctly. The problem arises ONLY IF these plugins are operating together. It’s possible that there is a disabling of the redirect to canonical permalinks. This is because if either Nextgen or WPML is deactivated, the redirect functions correctly.

    Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @dimmex,

    I am sorry, but it doesn’t look like I wasn’t able to replicate the problem.

    Could you please let us know what permalink setting do you have in “Settings>>Permalinks” and also what do you use for “WPML>>Languages>>Language URL format”?

    Thread Starter dimmex

    (@dimmex)

    Hi!

    The WPML url settings are using Languages in different catalogs.

    I contacted WPML developers with the same problem. They saw this problem too.

    The problem is easily reproducible on pure WordPress with any design template. Just install WPML plugin and Nextgen Gallery, create a page of format “page” and try to open it by canonical url and url of format ?page_id. Under normal operation, there should be a redirect to the canonical url, but it doesn’t work.

    Thread Starter dimmex

    (@dimmex)

    WPML tech support offered the following solution:

    Our team investigated and found the following workaround:

    // WPML fix. if ( in_array( ‘SitePress’, get_declared_classes(), true ) ) { Router::$use_canonical_redirect = true; Router::$use_old_slugs = false; \add_action( ‘template_redirect’, [ $this, ‘fix_wpml_canonical_redirect’ ], 1 ); }

    which you can add to app/public/wp-content/plugins/nextgen-gallery/src/Util/ThirdPartyCompatibility.php file after the following code (line #108):

    // Like WPML, BuddyPress is incompatible with our routing hacks. if ( function_exists( ‘buddypress’ ) ) { Router::$use_canonical_redirect = false; Router::$use_old_slugs = false; }

    What do you think? Will it work?

    Plugin Support Jaime Segura

    (@jaimeimagely)

    Hi @dimmex,

    I will ask the developers to take a look and also ping Mihai.

    Thanks

    Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @dimmex,

    Just as an update here, our developers are reviewing the fix provided and the possibility of including it in one of the future updates.

    Thank once again for bringing it up to our attention and for sharing the fix suggestion, we do appreciate it.

    Plugin Support Mihai Ceban

    (@mihaiimagely)

    Hi @dimmex,

    I am happy to inform you that our developers have implemented the suggested WPML fix in NextGen Gallery 3.58 version. ?

    Please feel free to update to the latest version of NextGen Gallery, then let me know if it works.

    Thanks!

    Thread Starter dimmex

    (@dimmex)

    Yes! After the update, everything works correctly! Thank you! Problem resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Conflict with WPML’ is closed to new replies.