WordPress.org

Ready to get started?Download WordPress

Forums

To Many Redirects (5 posts)

  1. AndrewHodges
    Member
    Posted 1 year ago #

    I am embarressed bringing this subject up as there are a wealth of articles about it and plugins however I cannot resolve the issue.

    I have tried resetting permalinks, deactivating all plugins, removing those that may have any impact on routing, blanked my .htaccess file then built it back bit by bit, installed 3 different plugins and can't resolve the issue. Yoast comes in for a bit of flack on this and I have removed it entirely. Of course I have played endlessly with the conical settings.

    Unlike some my site http://fernleafconsulting.co.uk runs fine. However when I try to create a post or page or user I get the redirect error. When a user tries to register he gets the same.

    I have this code running:

    // Add page after new user registered
        add_action('user_register', 'registration_newpage');
    
        function registration_newpage($user_id) {
    
            $user_info = get_userdata($user_id);
            $username = $user_info->user_login;
            $post = array();
            $post['post_name']    = 'Members-Page-for-'.$username; // The name (slug) for the page
            $post['post_type']    = 'page'; //could be 'page' for example
            $post['post_content'] = esc_attr($username.' - This page was created for you and any messages that we need to send you with regards to any products, services or changes to your membership will be posted here.'.$userid);
            $post['post_author']  = $username;
            $post['post_status']  = 'publish'; //status
            $post['post_title']   = 'Members Page for '.$username;
            $postid = wp_insert_post ($post);
            if (!$post_id) {
                wp_die('Error creating template page');
            } else {
                update_post_meta($post_id, '_wp_page_template', 'page-members.php');
            }
            return;
        }

    which illustrates what happens. I create a user it gets a redirect error but the user is created. This code fires but fails wp_insert post although the page is created but without the template.

    Any help would be greatfully received.

  2. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    You do have a validation error showing an extra </head>

    You also have a run-a-way script that comes right after the javascript error CSS3111: @font-face encounter unknown. Then this start and does not stop.
    FB.getLoginStatus()called before calling (I could catch the rest)
    checking
    set timeout
    then it repeats the checking, set timeout and doesn't stop.

    I am not sure if any of this relates to your problem.

  3. AndrewHodges
    Member
    Posted 1 year ago #

    kmessinger - thanks for looking. That may account for slow loading but I will sort it and see if it accounts for the redirect.

    Can I ask which tool you used to check or was it say Chrome because oddly it does not show up on mine.

    Thanks once again

  4. kmessinger
    Volunteer Moderator
    Posted 1 year ago #

    Chrome/Tools/javascript console and IE10/developer tools/script/start debugging

  5. AndrewHodges
    Member
    Posted 1 year ago #

    Just to let you know the main error came from a Plugin called Cookie Confirm which was a log call. The </head> was in a remark? Thanks for looking unfortunately having tracked a number of errors, two still outstanding with Yoast and s2members, I still have the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags