Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / contact us redirect loop of death.

contact us redirect loop of death.

Views: 1,066

Results 1 to 9 of 9
1 May 2020, 11:00 PM
#1
mrspiffy avatar

mrspiffy

New Zenner

Join Date:
Mar 2009
Posts:
29
Plugin Contributions:
1

contact us redirect loop of death.

If you've been having problems with the "contact us" link in the information side box, where clicking on the link generates an auto loop error or simply doesn't load, then this fix might be for you.

This fix applies to v156. You mileage may vary with other releases. You also need to NOT be running ssl on your website.

That's the problem here. Due to an incorrect setting, the contact_us file assumes you're using SSL so it redirects to your ssl enabled url, which defaults back to the non-enabled url which redirects on and on till it errors out.

The fix is to edit your includes/configure.php and set ENABLE_SSL to false.

I spent hours (and likely if you're reading this, you did too) researching this and looking for a solution till I finally dug through the code and sussed it out.

Please don't post a "Well, duh!" followup. Zen cart has a lot of levers to flip in order to get your site up, its very easy to miss a configuration setting.

1 May 2020, 11:21 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,703
Plugin Contributions:
56

Re: contact us redirect loop of death.

Thanks for taking the time to post this tip.

The recommended configuration for Zen Cart is with SSL though.
https://docs.zen-cart.com/user/first_steps/yes_you_need_ssl/

1 May 2020, 11:39 PM
#3
mrspiffy avatar

mrspiffy

New Zenner

Join Date:
Mar 2009
Posts:
29
Plugin Contributions:
1

Re: contact us redirect loop of death.

swguy:

Thanks for taking the time to post this tip.

The recommended configuration for Zen Cart is with SSL though.
https://docs.zen-cart.com/user/first_steps/yes_you_need_ssl/

Yup, and that's how I got myself into trouble.

  1. Work thru configuration guide, leave ENABLE_SSL on.
  2. Finish setting up web site.
  3. Realize that I didn't need SSL
  4. Forget to turn off ENABLE_SSL
  5. ??????? what the heck, contact us!
2 May 2020, 6:27 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,799
Plugin Contributions:
15

Re: contact us redirect loop of death.

MrSpiffy:

Yup, and that's how I got myself into trouble.

  1. Work thru configuration guide, leave ENABLE_SSL on.
  2. Finish setting up web site.
    3) Realize that I didn't need SSL
  3. Forget to turn off ENABLE_SSL
  4. ??????? what the heck, contact us!The only reason for not having an SSL in today's world is if you are working on a test site or local test installation. More and more, browsers are denying access to sites that are not 100% https://. Even a showcase site that doesn't handle a single payment should be secured simply to protect customer data.
2 May 2020, 2:00 PM
#5
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,962
Plugin Contributions:
8

Re: contact us redirect loop of death.

dbltoe:

The only reason for not having an SSL in today's world is if you are working on a test site or local test installation. More and more, browsers are denying access to sites that are not 100% https://. Even a showcase site that doesn't handle a single payment should be secured simply to protect customer data.

even then, i think it is still a good idea to have SSL enabled.

the whole point of having a test site is to mirror the live site. one can then reproduce errors and correct them on the test site and push the fixes up to a live site.

considering the number of problems users have with SSL and the configure files, it would behoove one to have their test installation as close to the live installation as possible, that would include SSL.

2 May 2020, 4:10 PM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,703
Plugin Contributions:
56

Re: contact us redirect loop of death.

Local testing was just a side note and not the real point of @dbltoe's post (or of this thread).

All live Zen Cart installations on the public Internet need to use SSL. All file transfer and admin access (Zen Admin or cPanel) must be done securely. This is not optional. BAD GUYS ARE EVERYWHERE. I wish it wasn't this way, but it is.

If you don't use SSL on your installation, then your admin login credentials traverse the Internet in PLAIN TEXT. You want to get hacked? Because this is how you get hacked.

2 May 2020, 7:58 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: contact us redirect loop of death.

MrSpiffy:

If you've been having problems with the "contact us" link in the information side box, where clicking on the link generates an auto loop error or simply doesn't load, then this fix might be for you.

This fix applies to v156. You mileage may vary with other releases. You also need to NOT be running ssl on your website.

That's the problem here. Due to an incorrect setting, the contact_us file assumes you're using SSL so it redirects to your ssl enabled url, which defaults back to the non-enabled url which redirects on and on till it errors out.

The fix is to edit your includes/configure.php and set ENABLE_SSL to false.

I spent hours (and likely if you're reading this, you did too) researching this and looking for a solution till I finally dug through the code and sussed it out.

Please don't post a "Well, duh!" followup. Zen cart has a lot of levers to flip in order to get your site up, its very easy to miss a configuration setting.
Wouldn't you also have problems in the checkout process with the original incorrect configuration? Which was where ENABLE_SSL was true but the site was not otherwise actually using a SSL?

3 May 2020, 6:51 PM
#8
mrspiffy avatar

mrspiffy

New Zenner

Join Date:
Mar 2009
Posts:
29
Plugin Contributions:
1

Re: contact us redirect loop of death.

mc12345678:

Wouldn't you also have problems in the checkout process with the original incorrect configuration? Which was where ENABLE_SSL was true but the site was not otherwise actually using a SSL?

Surprisingly, no. The contact us page was the only problem.

3 May 2020, 6:59 PM
#9
mrspiffy avatar

mrspiffy

New Zenner

Join Date:
Mar 2009
Posts:
29
Plugin Contributions:
1

Re: contact us redirect loop of death.

dbltoe:

The only reason for not having an SSL in today's world is if you are working on a test site or local test installation. More and more, browsers are denying access to sites that are not 100% https://. Even a showcase site that doesn't handle a single payment should be secured simply to protect customer data.

Another edge case to this scenario is where you've configured your site for SSL, but for whatever reason, your host hasn't. Ive had that happen too.