Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Forgotten Password page missing

Forgotten Password page missing

Views: 3,585

Results 1 to 20 of 23
30 Apr 2012, 10:24 PM
#1
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Forgotten Password page missing

I discovered today that customers who click the forgotten password link during the login process are taken to an error page. It seems there's no page at zen/index.php?main_page=password_forgotten

Is this a template override problem, or just an admin configuration problem? I'm not sure of the name or the location of the php file I'd need to look for. Any useful ideas?

30 Apr 2012, 10:42 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Forgotten Password page missing

Any ?main_page=xxxxxxx requires that there be at least the first of these three related components:

/includes/modules/pages/xxxxxxx/header_php.php
/includes/languages/english/xxxxxxxx.php
/includes/templates/a_template_name/templates/tpl_xxxxxxx_default.php

If the header_php.php file is missing, then a 404 will be triggered.

30 Apr 2012, 11:09 PM
#3
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Okay. Looks like
/includes/modules/pages/xxxxxxx/header_php.php
/includes/languages/english/xxxxxxxx.php

are there, and this one's there under templates/template_defaults/templates/ but it's not in templates/mytemplate/templates

/includes/templates/a_template_name/templates/tpl_xxxxxxx_default.php

30 Apr 2012, 11:23 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Forgotten Password page missing

It doesn't need to be in your mytemplate folder if you haven't customized anything in it beyond what's in template_default. (template_default IS the "default", ie: what will be used if there's no override in your custom template folder)

Try changing the setting in Admin->Configuration->My Store->Missing Page Check from "404 Not Found" to "Off" and see what error message is shown, if any. That's for testing/debugging only, not for live use ... so be sure to put it back to Not Found or to Home/On again.

1 May 2012, 5:38 PM
#5
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Okay. I got 'remote server or file not found'. Perhaps I've got something in my custom template that's causing trouble...

3 May 2012, 10:53 PM
#6
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Still haven't figured out what the problem is here. Been going over the 3 files to see if I noticed anything amiss, but can't figure out why the page wouldn't show up.

4 May 2012, 2:10 AM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Forgotten Password page missing

Switch back to the 'classic' template. Does the problem go away? If so, its definelty something to do with your custom template. :)

Cheers
Rod

7 May 2012, 5:05 PM
#9
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Working on this problem still. Tracking backwards from the link that doesn't work. I found that the inclues/languages/english/login.php page assigns the text 'Forgot your password' to a variable called TEXT_PASSWORD_FORGOTTEN. Now searching for the file where that variable is used...

7 May 2012, 5:17 PM
#10
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Found it in templates/template_default/templates/tpl_login_default.php

7 May 2012, 5:27 PM
#11
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

also checked for this line:
define('FILENAME_PASSWORD_FORGOTTEN', 'password_forgotten');
in the filenames.php file. It's there.

7 May 2012, 7:39 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Forgotten Password page missing

weirdorecords:

Okay. I got 'remote server or file not found'. Perhaps I've got something in my custom template that's causing trouble...

That sounds like a redirect happening outside Zen Cart. Maybe .htaccess or something else? Contact your hosting company.

8 May 2012, 3:23 PM
#13
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Hosting company says: We are able to replicate the error however it does not show in any of our logs. They suggested I try here.

DrByte:

That sounds like a redirect happening outside Zen Cart. Maybe .htaccess or something else? Contact your hosting company.

10 May 2012, 11:57 PM
#15
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Okay. Did this and all 3 of these were identical:
/includes/modules/pages/xxxxxxx/header_php.php
/includes/languages/english/xxxxxxxx.php
/includes/templates/a_template_name/templates/tpl_xxxxxxx_default.php

Also checked with the hosting co. again specifically to see if there was some dns problem (eg if these files were on a different server as the rest of my files). No luck there.

11 May 2012, 1:07 AM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Forgotten Password page missing

So, maybe the problem is beyond those three files. Hence the suggestion to compare EVERYTHING.

11 May 2012, 1:50 AM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Forgotten Password page missing

weirdorecords:

Okay. I got 'remote server or file not found'. Perhaps I've got something in my custom template that's causing trouble...

You've made some edits to your /languages/english/password_forgotten.php file haven't you?

Restore this file from the distribution files (or just delete the override file if you have used one), and your problem will go away).

Actually, I'll go one better.... I'm betting that the line you have edited is this one:

define('TEXT_MAIN', 'Enter your email address below and we'll send you an email message containing your new password.');

And the edit you made was to remove the "" from "we'll" so the line now reads:

define('TEXT_MAIN', 'Enter your email address below and we'll send you an email message containing your new password.');

Cheers
Rod.

ps. If you promise to buy the zencart team a coffee, I'll tell you how I discovered this :)

11 May 2012, 4:58 PM
#18
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Sorry to say I don't think that's it, unless there's an override file somewhere that I haven't noticed. I had changed my password_forgotten.php file, but changing it back to the default doesn't solve the problem. Also, the changed version has no contractions or quotes. Here's how it looks.

define('TEXT_MAIN', 'Enter your email address below and we will send you an email message containing a new password.');

define('TEXT_NO_EMAIL_ADDRESS_FOUND', 'Error: The Email Address was not found in our records; please try again.');

define('EMAIL_PASSWORD_REMINDER_SUBJECT', STORE_NAME . ' - New Password');
define('EMAIL_PASSWORD_REMINDER_BODY', 'So, I got a request for a new password from ' . $_SERVER['REMOTE_ADDR']  . '.' . "\n\n" . 'And therefore, your new password at '\ . STORE_NAME . \' is:' . "\n\n" . '   %s' . "\n\nAfter you have logged in using the new password, you can change it to whatever you want by going to My Account.");

define('SUCCESS_PASSWORD_SENT', 'A new password has been sent to your email address.');
?>

Also, I've done winmerge on my entire current shop vs the entire default set. There are 4,232 files in the comparison results. Some of the files are obviously not relevant to my problem, but I'm having trouble narrowing down which files would be relevant.

11 May 2012, 4:59 PM
#19
weirdorecords avatar

weirdorecords

New Zenner

Join Date:
May 2010
Posts:
72
Plugin Contributions:
0

Re: Forgotten Password page missing

Forgot to say, I'd gladly buy the zencart team a coffee anyhow, you folks have been extremely helpful to me many times in the last few years.

12 May 2012, 3:33 AM
#20
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Forgotten Password page missing

weirdorecords:

Forgot to say, I'd gladly buy the zencart team a coffee anyhow, you folks have been extremely helpful to me many times in the last few years.

You wouldn't beleive how close I was though (right file, wrong edit)

This is the line causing your problem.

define('EMAIL_PASSWORD_REMINDER_BODY', 'So, I got a request for a new password from ' . $_SERVER['REMOTE_ADDR']  . '.' . "\n\n" . 'And therefore, your new password at '\ . STORE_NAME . \' is:' . "\n\n" . '   %s' . "\n\nAfter you have logged in using the new password, you can change it to whatever you want by going to My Account.");

To be more specific,


your new password at** '\ **. STORE_NAME . ' is:' .

Should be:
your new password at ' . STORE_NAME . ' is:' .

Cheers
Rod