Support » Fixing WordPress » call of the page often ends up in loading a certain page ( too many redirects)

  • hello dear all,

    first of all; many many thanks for the continued support: This is just awesome:
    i have a page where i noticed that if you call the page it just jumps to a certain page:

    then in the screen i have the following text:

    this page is not working: the mypage.com has redirected you to many times
     
    erase your cookies
    ERR_TOO_MANY_REDIRECTS
    

    btw: this page ( the mypage.com/?page_id=63 ) is the so called Account-page: Accont: [woocommerce_my_account]

    – why is this so !?
    – why does this redirect is active!?
    – can i do some tests to check if it get rid of this redirect!? eg if i change the page_id=63 to some other value
    – does it have to do something with [woocommerce_my_account]?
    – can i do something again

    i would be more than glad if i can solve this issue

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator bcworkz

    (@bcworkz)

    Do you have your permalinks set to “Plain”? (the page_id=63 style of permalink) IIRC, WooCommerce is intended to only work with “pretty” permalinks. Without it, redirects just infinitely bounce back and forth between 63 and my_account requests.

    This is a vague recollection from a while back. I recommend confirming through their dedicated support forum. Or just try pretty permalinks and see if that helps 🙂

    Thread Starter lebrochet

    (@lebrochet)

    hello dear @bcworkz

    first of all many many thanks for the reply. glad to hear from you.

    this is very very interesting: Note in the meanwhile, i have set woocomerce to “deactivated” and now the phenomenon dissapeared.
    in other words: the behavior of the page now is pretty good and all right.

    Do you have your permalinks set to “Plain”? (the page_id=63 style of permalink) IIRC, WooCommerce is intended to only work with “pretty” permalinks. Without it, redirects just infinitely bounce back and forth between 63 and my_account requests.
    This is a vague recollection from a while back. I recommend confirming through their dedicated support forum. Or just try pretty permalinks and see if that helps

    i am not sure if i got you right – but i think that you are right – i can imagine that this permalink thing can cause this issue.

    question: could you explain a bit more – how to set the permalink correct!? This would be great. I look forward to hear from you.

    see the page and the settings.

    if i need to make more photos – just let me know.

    Dear @bcworkz – i am very very glad that you replied – and i think that i am able to debug this site now. I struggle with this behavior since several weeks – and now i am pretty sure that we are very very close to a solution.

    look forward to hear from you again

    retgards lebrochet

    Moderator bcworkz

    (@bcworkz)

    The account page will not do much of anything without WooCommerce being active. Once active, the [woocommerce_my_account] bit gets expanded into a full blown user account page when someone requests the page. This is one of many “shortcodes” with similar behavior.

    To resolve the permalinks issue, you need to be logged in as administrator. In the admin area, go to Settings > Permalinks. Under Common Settings, I believe the setting on that page is currently “PLain”. Pick any of the other options. The “Post name” setting is what most people use. You could in fact construct your own custom structure, but post name will suffice to confirm if I’m correct about this.

    Ignore the remaining sections and save changes. You can fiddle with the other sections later if you’re so inclined. More info on the permalink settings screen is here:

    Settings Permalinks Screen

    After changing the permalinks structure, all URLs will be more like example.com/my-account/ instead of example.com/?page_id=63. Even so, any existing links like ?page_id=63 (i.e. from other pages or search engines) will continue to work. WP will automatically redirect them to the /my-account/ style. This redirect will happen one time, not too many times 🙂

    What I think was happening to your site is WooCommerce tried to redirect ?page_id=63 to /my-account/. Then WordPress tried to redirect that back to ?page_id=63. Which WooCommerce then tried to redirect back to /my-account/. Which WordPress tried to redirect… etc. etc. ad infinitum.

    Thread Starter lebrochet

    (@lebrochet)

    hello dear @bcworkz

    just a quick note – – since i am short of time at the moment.

    i will reply more thougrohly tomorrow

    i am sure you are right – i am very sure. you have helped me so much.

    i have had a quick view on the settings.
    see what we ve got

    i will write more tomorrow.

    have a great day.

    Moderator bcworkz

    (@bcworkz)

    If your site is already set for post name permalinks, I’m unsure why your links are still the /?page_id=63 style. Something isn’t right. I suggest changing to “Plain” and saving. Then change back to “Post name” and save again. Hopefully switching back and forth will set things straight.

    Thread Starter lebrochet

    (@lebrochet)

    hi dear @bcworkz

    Thank you for the reply – and for sharing your insights. I am happy. I will try to set it straight.

    I will digg deeper and i will let you know further details in the next few days.

    greetings

    Thread Starter lebrochet

    (@lebrochet)

    hello dear @bcworkz

    many thanks for all you did so far: your help is just overwhelming:

    to verificate the issues – and the plugin that is causing the errors.

    here some experiments and tests: i have installed two “woocommerce things”

    – Simple Registration for WooCommerce
    – Woocommerce

    to check which plugin is responsible for the mess of redirection i switched it off each by each – step by step:

    – “Simple Registration for WooCommerce”
    – but with Woocommerce

    in the first step i have switched off the “Simple Registration for WooCommerce”
    see what ive got back_

    User Agent: Wheregoes.com Redirect Checker/1.0
    
    #CodeRequested URL
    302 Redirects: 4
    1 302 redirect302 Redirect
    2 302 redirect302 Redirect
    3 302 Error: Loop detected! Instance:2
    redirect302 Redirect
    4 302 Error: Loop detected! Instance:3
    redirect302 Redirect
    5 None https://www.my-site.com/?page_id=63
    Error: Loop detected! Instance:4
    Error: Infinite loop detected.

    Well this is very very interesting: if i switch off the Woocommerce then i am getting the culpritt plugin

    the next text i did without Woocommmerce:
    see here the results:

    1302
    redirect302 Redirect
    2200  https://www.my-site.com/wp-login.php?redirect_to=%2F
    Trace Complete1302
    redirect302 Redirect
    2200  https://www.my-site.com/wp-login.php?redirect_to=%2F
    Trace Complete

    conclusio: here we have got an error: Infinite loop detected.

    many thanks for all you did

    i am very glad to be part of this awesome forum

    Moderator bcworkz

    (@bcworkz)

    I’m unsure what the root cause of this is. WooCommerce itself has millions of installations. Presumably virtually all are working fine, so it’s hard to believe it’s the cause. Redirecting to a login page when one requests their account page is normal if they are not logged in. If they are logged in and get redirected, there is a cookie issue of some sort.

    Redirecting after login to %2F (/ or home page) is a little odd if the account page was requested, but it’s not technically wrong. Also, even though you have permalinks set to post name, redirecting to ?page_id=63 isn’t technically wrong either. WP will contribute to redirects by going to the accounts page which has that ID value, but it should end there, or maybe at the login page if the user is not yet logged in. There shouldn’t be continued redirects after that.

    When testing plugin conflicts which might involve permalinks and rewrite rules, I recommend revisiting the permalinks settings screen after any change. No need to change anything on the screen, loading the screen is enough. This regenerates rewrite rules. Plugins affecting rewrite rules are expected to regenerate for themselves, but they could fail to do so for various reasons. Having the wrong rewrite rules can certainly result in infinite redirects.

    Caching can confuse debugging efforts. Either disable caching both client and server side, or flush any active caches to ensure you will get fresh content from the server.

    There is a chance that two different plugins will not work properly together, yet will work fine when either is on their own without the other. This is why it’s best to begin testing with no plugins and one of the twenty* default themes active. Of course, for WooCommerce related issues you’ll need it active, but it should work fine on its own. If problems then start when only Simple Registration is then activated, then you can be sure that it’s really the source of the trouble. Then you can seek assistance through Simple Registration’s dedicated support forum where its devs are in the best position to help you further.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘call of the page often ends up in loading a certain page ( too many redirects)’ is closed to new replies.