Quote Originally Posted by carlwhat View Post
@lat9

in commit #42, in the usu class, it seems you have deleted line 100 which had the following code:

PHP Code:
// Determine canonical (if needed)
        
$this->canonical(); 
was this on purpose?

in my testing, this changes causes the automatic redirects to not happen.

now, whether that line of code is pertinent to the original redirect problem, i can not say, as i did not reproduce the original error.

john,
what happens if you add that line back?

starting at line 94 of includes/classes/usu.php, make it look like so:

PHP Code:
            } elseif (IS_ADMIN_FLAG) { is was is causing the
                
// Message Stack will be available when loaded from the admin
                
$GLOBALS['messageStack']->add(sprintf(USU_PLUGIN_WARNING_TABLETABLE_USU_CACHE), 'warning');
            }
        }

        
// Determine canonical (if needed)
        
$this->canonical();

        
// Start logging
        
$this->debug false;
        if (
defined('USU_DEBUG') && USU_DEBUG == 'true') { 
does this fix your redirect as well as preserve the fix to your original problem?
Noting that the call to $this->canonical in the usu class' constructor was moved (as part of the redirect-loop correction) to the USU's observer class upon receipt of a notification issued at the beginning of the init_canonical.php's processing.

The subsequent issue caused by that move is that the redirect handling for 'renamed' products/categories needs to move also to the canonical-link generation phase of a page's rendering.