Support » Plugin: Permalink Manager Lite » Too many redirects

  • Resolved sifuhall

    (@sifuhall)


    This seems like the plugin I have been looking for.

    Everything works great, except when I go to /user my browser times out with too many redirects.

    I’ve cleared cookies and cache and even tried a different browser.

    I’m sure it is something I have set incorrectly but what could it be?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi @sifuhall,

    Could you try to add ?debug_wp_redirect to the end of URL and send me the screenshot with debug data?

    Best regards,
    Maciej

    Thread Starter sifuhall

    (@sifuhall)

    Array
    (
        [url] => https://www.ccwky.org/user/?debug_wp_redirect
        [backtrace] => Array
            (
                [0] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/class-wp-hook.php
                        [line] => 292
                        [function] => debug_wp_redirect
                        [class] => Permalink_Manager_Debug_Functions
                        [type] => ->
                    )
    
                [1] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/plugin.php
                        [line] => 212
                        [function] => apply_filters
                        [class] => WP_Hook
                        [type] => ->
                    )
    
                [2] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/pluggable.php
                        [line] => 1290
                        [function] => apply_filters
                    )
    
                [3] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/canonical.php
                        [line] => 799
                        [function] => wp_redirect
                    )
    
                [4] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/class-wp-hook.php
                        [line] => 292
                        [function] => redirect_canonical
                    )
    
                [5] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/class-wp-hook.php
                        [line] => 316
                        [function] => apply_filters
                        [class] => WP_Hook
                        [type] => ->
                    )
    
                [6] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/plugin.php
                        [line] => 484
                        [function] => do_action
                        [class] => WP_Hook
                        [type] => ->
                    )
    
                [7] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/template-loader.php
                        [line] => 13
                        [function] => do_action
                    )
    
                [8] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-blog-header.php
                        [line] => 19
                        [args] => Array
                            (
                                [0] => /home/ccwky/public_html/wp-includes/template-loader.php
                            )
    
                        [function] => require_once
                    )
    
                [9] => Array
                    (
                        [file] => /home/ccwky/public_html/index.php
                        [line] => 17
                        [args] => Array
                            (
                                [0] => /home/ccwky/public_html/wp-blog-header.php
                            )
    
                        [function] => require
                    )
    
            )
    
    )
    Plugin Author Maciej Bis

    (@mbis)

    Thank you! Could you check if the issue still persists when my plugin is deactivated?

    The redirect loop is triggered with one of Ulimate Member functions:
    https://plugins.trac.wordpress.org/browser/ultimate-member/trunk/includes/core/class-rewrite.php#L167

    Thread Starter sifuhall

    (@sifuhall)

    The link works fine when permalink manager lite is deactivated

    Plugin Author Maciej Bis

    (@mbis)

    Could you by any chance provide me with temp. admin access to a development/staging website (if you have any)? My email address is contact /at/ maciejbis.net

    Thread Starter sifuhall

    (@sifuhall)

    Thank you.

    I have emailed the information

    Plugin Author Maciej Bis

    (@mbis)

    Hi @sifuhall,

    Thanks – unfortunately I was not able to reproduce the same redirect loop with my user account. I added a custom snippet (via “Snippet” plugin) that would prevent my plugin from triggering any additional redirects. Could you check if it works on your end?

    add_action('template_redirect', function() {
    	global $pm_query;
    	
    	// Do not trigger if Ultimate Member clasess are not loaded
    	if(!class_exists('UM')) {
    		return;
    	}
    	
    	// Get ID of "User" page from Ultimate Member settings
    	$um_page_id = UM()->config()->permalinks['user'];
    	
    	if(um_is_core_page('user') || (!empty($pm_query['id']) && $um_page_id == $pm_query['id'])) {
    		add_filter('permalink_manager_filter_redirect', '__return_null');
    	}
    }, 0);
    Thread Starter sifuhall

    (@sifuhall)

    I am still getting the same redirect error on the /user page

    test
    Array
    (
        [url] => https://www.ccwky.org/user/chris+hall/?debug_wp_redirect
        [backtrace] => Array
            (
                [0] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/class-wp-hook.php
                        [line] => 292
                        [function] => debug_wp_redirect
                        [class] => Permalink_Manager_Debug_Functions
                        [type] => ->
                    )
    
                [1] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/plugin.php
                        [line] => 212
                        [function] => apply_filters
                        [class] => WP_Hook
                        [type] => ->
                    )
    
                [2] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/pluggable.php
                        [line] => 1290
                        [function] => apply_filters
                    )
    
                [3] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-content/plugins/ultimate-member/includes/core/class-rewrite.php
                        [line] => 274
                        [function] => wp_redirect
                    )
    
                [4] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/class-wp-hook.php
                        [line] => 292
                        [function] => locate_user_profile
                        [class] => um\core\Rewrite
                        [type] => ->
                    )
    
                [5] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/class-wp-hook.php
                        [line] => 316
                        [function] => apply_filters
                        [class] => WP_Hook
                        [type] => ->
                    )
    
                [6] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/plugin.php
                        [line] => 484
                        [function] => do_action
                        [class] => WP_Hook
                        [type] => ->
                    )
    
                [7] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-includes/template-loader.php
                        [line] => 13
                        [function] => do_action
                    )
    
                [8] => Array
                    (
                        [file] => /home/ccwky/public_html/wp-blog-header.php
                        [line] => 19
                        [args] => Array
                            (
                                [0] => /home/ccwky/public_html/wp-includes/template-loader.php
                            )
    
                        [function] => require_once
                    )
    
                [9] => Array
                    (
                        [file] => /home/ccwky/public_html/index.php
                        [line] => 17
                        [args] => Array
                            (
                                [0] => /home/ccwky/public_html/wp-blog-header.php
                            )
    
                        [function] => require
                    )
    
            )
    
    )
    Plugin Author Maciej Bis

    (@mbis)

    Hi @sifuhall,

    According to the logs that you have sent there are two redirect functions triggered at the same time. The first one is the native canonical redirect (WordPress based) and the second one used by Ultimate Member.

    The latter one cannot be disabled, as Ulitmate Press automatically redirects users from “/user/“ page to individual user page (if logged-in), eg: “/user/chris+hall” or homepage (if not logged-in).

    Did you happen to contact Ultimate Member support?

    Plugin Author Maciej Bis

    (@mbis)

    Hi @sifuhall,

    I think I know what the problem is. My plugin cannot correctly parse the user name if it consists of more than words. I will try to prepare a hotfix solution in next few hours. I apologize for all the inconvenience.

    Plugin Author Maciej Bis

    (@mbis)

    Hi @sifuhall,

    Yesterday, I have adjusted the code of my plugin on your end and now the usernames should be parsed correctly. The same changes will be also present in the next version of plugin. Could you double check it and confirm that it works correctly?

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.