I'm getting close, or at least closer, to migrating my 1.0.5.0 Phoenix Shop to 1.0.8.20 using PHP 8.1 and just discovered a problem on my 1.0.8.20 shop when I have items in my shopping cart and haven't yet logged in. If I click on the Checkout Button in the Shopping Cart page it takes me to the login page via a redirect from checkout shipping...for some reason that results in the TOO-MANY-REDIRECTS issue as can be seen in the Chrome network tool. A screeen shot is attached. Thanks to Matt for pointing out the use of that Chrome tool in trouble shooting a different TOO-MANY-REDIRECTS issue otherwise I think I would have spent way to much time thinking this was a cookie issue as suggested by Firefox.
In trying to trouble shoot this I tested logging in when I have an item in my shopping cart using the login option from the NavBar My profile dropdown list and that seems to take me directly to the login page and things work as expected. I have Rainers Shipping estimator installed on the Shopping Cart page where I also have the Checkout Button and if I login using his Shipping Estimator Login button things also work as expect as well. Both take me directly to the login page without the redirect from checkout shipping. While the TOO-MANY-REDIRECTS issue might be caused by some other problem I'm thinking that the redirect to the login page via the checkout shipping page using the Checkout button is causing the problem but that is just pure speculation on my part.
I'm at a bit of a lost as to where I should go from here....if anyone has any suggestions I'd welcome them.
Dan
Trouble Shooting - ERR_TOO_MANY_REDIRECTS
- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
I remember having a similar problem and it turned out that the configure.php file was incorrect, but I can't remember exactly the fix.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
Dan Cole
- Senior Contributor
- Posts: 499
- Joined: Fri Oct 25, 2019 2:14 pm
- Phoenix Version: 1.0.8.21
- Has thanked: 67 times
- Been thanked: 61 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
In case it helps here is what my shop side config file looks like...
error_reporting(E_ALL);
const HTTP_SERVER = 'https://fishfoods.ca';
const COOKIE_OPTIONS = [
'lifetime' => 0,
'domain' => 'fishfoods.ca',
'path' => '/PhoenixCart/',
'samesite' => 'Lax',
'secure' => true,
];
const DIR_WS_CATALOG = '/PhoenixCart/';
date_default_timezone_set('America/New_York');
Dan
error_reporting(E_ALL);
const HTTP_SERVER = 'https://fishfoods.ca';
const COOKIE_OPTIONS = [
'lifetime' => 0,
'domain' => 'fishfoods.ca',
'path' => '/PhoenixCart/',
'samesite' => 'Lax',
'secure' => true,
];
const DIR_WS_CATALOG = '/PhoenixCart/';
date_default_timezone_set('America/New_York');
Dan
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
Just to be sure: you are not using my 2 page checkout addon?
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
Dan Cole
- Senior Contributor
- Posts: 499
- Joined: Fri Oct 25, 2019 2:14 pm
- Phoenix Version: 1.0.8.21
- Has thanked: 67 times
- Been thanked: 61 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
Not on my 1.0.8.20 shop but I do use it on my 1.0.5.0 site.
Dan
- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
When I visited fishfoodS.ca it redirected me to fishfood.ca (note no S), then back to fishfoodS.ca
That might be part of the problem ?
That might be part of the problem ?
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
Dan Cole
- Senior Contributor
- Posts: 499
- Joined: Fri Oct 25, 2019 2:14 pm
- Phoenix Version: 1.0.8.21
- Has thanked: 67 times
- Been thanked: 61 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
You have keen eyes Gary...I needed my cheats to see that. I tried fixing it via the cpanel but it won't allow me to do that so I sent a note to the host and asked for that to be sorted...as soon as it is, I'll test again and see if it helps. In either case I'll report back. Thanks for checking it and for the idea.
Dan
-
Dan Cole
- Senior Contributor
- Posts: 499
- Joined: Fri Oct 25, 2019 2:14 pm
- Phoenix Version: 1.0.8.21
- Has thanked: 67 times
- Been thanked: 61 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
The "s" issue has been sorted but unfortunately the TOO_MANY_REDIRECTS issue persists.When I visited fishfoodS.ca it redirected me to fishfood.ca (note no S), then back to fishfoodS.ca
That might be part of the problem ?
Dan
-
Dan Cole
- Senior Contributor
- Posts: 499
- Joined: Fri Oct 25, 2019 2:14 pm
- Phoenix Version: 1.0.8.21
- Has thanked: 67 times
- Been thanked: 61 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
Found it....it is caused by this hook that we added to bypass the shipping page when shipping was already selected using the shipping estimator.
I assume it needs some kind of condition so it doesn't try to skip the shipping page if it is not set. Perhaps $_SESSION['shipping'] is set to true when set and can be used for that purpose.
Dan
Code: Select all
class hook_shop_checkout_shipping_skipShipping {
public function listen_injectRedirects() {
//[list] $_SESSION['shipping'] = false;[/list]
// $_SESSION['sendto'] = false;
Href::redirect($GLOBALS['Linker']->build('checkout_payment.php'));
}
}Dan
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: Trouble Shooting - ERR_TOO_MANY_REDIRECTS
You should use the 2 page checkout which handles it.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27