• Resolved sigmund1410

    (@sigmund1410)


    Hello there…
    I’m experiencing a fatal bug. There is an issue/conflict between buddypress and Next Gen Gallery which causes some weird redirects. For example, when i click on my profile gravatar, instead of taking me to my profile page, it redirects me to forums or groups. I found many topics on the internet regarding this bug but found no fix. Please help, this is a serious issue.

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

    (@imagely)

    Hi @sigmund1410,

    Let’s first check to see if there is a plugin conflict happening. Temporarily deactivate all plugins, then reactivate NextGEN Gallery and BuddyPress only. Does the issue still appear? If so, temporarily switch to a WordPress default theme (this deactivation is only intended to quickly check to see if the issue goes away or is still present). If by deactivating the other plugins the issue does go away, reactivate each of the other plugins one at a time to locate the culprit. Keep me posted on your results ??

    Mihai

    I see this is a very common problem that has been reported since as early as 2008 since URL redirection was introduced in NextGen gallery plugin. I’m a software engineer and found a block of code from another user that indeed fixes the routing issues. Please update your plugin so that is not necessary to user workaround.

    wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\third_party_compat\module.third_party_compat.php

            // WPML fix
            if (class_exists('SitePress')) {
                M_WordPress_Routing::$_use_canonical_redirect = FALSE;
                //M_WordPress_Routing::$_use_canonical_redirect = FALSE;
                M_WordPress_Routing::$_use_old_slugs = FALSE;
                add_action('template_redirect', array(&$this, 'fix_wpml_canonical_redirect'), 1);
            }
    
        function fix_buddypress_routing()
        {
            M_WordPress_Routing::$_use_canonical_redirect = FALSE;
            //M_WordPress_Routing::$_use_canonical_redirect = FALSE;
    
            return FALSE;
        }
    
        function fix_wpml_canonical_redirect()
        {
            M_WordPress_Routing::$_use_canonical_redirect = FALSE;
            //M_WordPress_Routing::$_use_canonical_redirect = FALSE;
            M_WordPress_Routing::$_use_old_slugs = FALSE;
        }

    wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\wordpress_routing\module.wordpress_routing.php

    class M_WordPress_Routing extends C_Base_Module
    {
        static $_use_canonical_redirect = TRUE;
        //static $_use_canonical_redirect = TRUE;
        static $_use_old_slugs          = TRUE;
    
        function define($id = 'pope-module',
    
            // this is the proper behavior but it causes problems with WPML
            else {
                if (self::$_use_old_slugs) wp_old_slug_redirect();
                if (self::$_use_canonical_redirect) redirect_canonical();
                //if (self::$_use_canonical_redirect) redirect_canonical();
            }
        }
    

    You basically have to comment out any lines of code that contains _use_canonical_redirect

    Plugin Contributor Imagely

    (@imagely)

    Hi @darrellhq!

    We want to take a closer look at this Buddypress conflict.
    Could you please share with us the steps to reproduce the same issue?
    If we can quickly reproduce the issue, we might not need to access your site.

    Please send us a bug report here: https://www.imagely.com/report-bug, refer back to this forum thread and let them know Gaby referred you.

    – Gaby

    I have isolated this bug in a dev environment with only the two plugins installed and enabled. Details were sent to https://www.imagely.com/report-bug. The issue still exists in the latest versions of both NextGen and WordPress.

    Hi @darrellhq

    Thank you so much for letting us know.
    According to our bug report, one of our agents was not able to replicate the same problem. We are waiting for some feedback for you.
    Again, many thanks!

    – Gaby, Customer Support

    Hello,

    This issue is till there. I just noticed it on my website,When you click on edit profile under your account in buddypress, it redirects to groups.This stops when I disabled NextGen. While searching for answers I saw this and I disabled Nextgen and the issue stopped.
    I made the changes @darrellhq suggested and everything is fine again.

    Hi @dhoyin if possible create a new thread so we can provide the adequate support.

    On the other hand, while testing the same issue in my end, I was able to solve the problem doing the following:

    – Changed permalinks to “Post name”.
    – Used an option in Tools > BuddyPress to repair everything.

    Please, if anyone else has some problems after trying these steps, open a new thread so we can create a new bug report. Many thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘NextGen + Buddypress fatal bug’ is closed to new replies.