I am on OC 3.0.2.1.
I have a problem with the resetting of the passwords for customers. When a customer want's to reset their password they press forgot password. Once clicked, they receive an email and reset their password. Once on the page, they receive an error stating: "Password reset code is invalid or was used previously"
I'm not sure where to begin to diagnose this. I was wondering if I can get some guidance or if anyone has experienced this?
Thanks in advance.
First step is usually to rule out any extensions or custom code - do you have either?
Second step is usually to work out exactly how that feature works in the code, so how is a reset code generated? Where is it stored? When is it then compared to the one in the link a customer clicks?
When a value is not what you expect (such as the code matching), tracing the value of the variable at each step is my standard debug procedure to see where it changes from the value you expect to the wrong one and why.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
http://www.canusbshop.com
We have discovered exactly this same problem.
Was this ever solved?
Attachments
PastedGraphic-9.png (19.67 KiB) Viewed 4780 times
What ways did you used to upgrade and which PHP and mySQL library version do you currently use since you upgraded your store?Samuraiartguy wrote: ↑Thu Apr 16, 2020 11:48 pmWe have a new v 3.0.3.2 site that we have migrated customers over from an old 1.5.x site.
http://www.canusbshop.com
We have discovered exactly this same problem.
Was this ever solved?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The fix is to either change the language definition in /catalog/language/xxx/forgotten to add a space before the sentence that gives the IP address:
Code: Select all
$_['text_ip'] = ' The IP used to make this request was: ';
Or else edit the template file in catalog/view/theme/default/template/mail/forgotten.twig and move the two parts with the IP texts before the link address so that the latter comes last, i.e. it should look like this:
Code: Select all
{{ text_greeting }}
{{ text_ip }}
{{ ip }}
{{ text_change }}
{{ reset }}
OpenCart 3.0.3.2 with "default store theme"
What php version?
If you are using PHP 7.4 there is a twig bug that causes spacing issues, you would need to use PHP 7.3 or upgrade to Opencart 3.0.3.6 which has the updated twig dependency .
Backup and learn how to recover before you make any changes!
The customer password reset seems working fine and gives the success message and I see no errors in the error logs in storage/logs however, the email has never been received to reset.
I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)
Check the mail_forgotten event is enabled.
You could check your mail server log to see it the email got that far. In cPanel it under Track Delivery.
Yes, it's enabled. Should I disable and enable it again? If I disable it will it still be there to enable it back?ADD Creative wrote: ↑Wed Jul 12, 2023 2:33 amCheck the mail_forgotten event is enabled.
You could check your mail server log to see it the email got that far. In cPanel it under Track Delivery.
I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)
Do any emails from the store send?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
I only get emails from the store for when a new customer has signed up and when I receive orders via an extension called "Customer order confirmation email for store owner" by Fabius.
I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)
If you disable that extension, does the issue persists with the emails?parkookk wrote: ↑Wed Jul 12, 2023 11:14 pmI only get emails from the store for when a new customer has signed up and when I receive orders via an extension called "Customer order confirmation email for store owner" by Fabius.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I can't see that disabling and then enabling it again would make any difference.parkookk wrote: ↑Wed Jul 12, 2023 7:05 pmYes, it's enabled. Should I disable and enable it again? If I disable it will it still be there to enable it back?ADD Creative wrote: ↑Wed Jul 12, 2023 2:33 amCheck the mail_forgotten event is enabled.
You could check your mail server log to see it the email got that far. In cPanel it under Track Delivery.
Sounds like it might be good for a developer to take a look really as it's hard to know at what point it's failing.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
3.0.3.8 is not compatible with PHP 8.2, so don't do this.straightlight wrote: ↑Fri Jul 14, 2023 2:02 amOr, to install the most recent OC v3.0.3.8 release and see if the issue can be produced with PHP 8.2+ as well.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
That's why I said: the most recent OC v3.0.3.8 release.paulfeakins wrote: ↑Fri Jul 14, 2023 7:04 pm3.0.3.8 is not compatible with PHP 8.2, so don't do this.straightlight wrote: ↑Fri Jul 14, 2023 2:02 amOr, to install the most recent OC v3.0.3.8 release and see if the issue can be produced with PHP 8.2+ as well.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
The most recent release of 3.x was in 2021. There have been no releases of 3.x compatible with PHP 8.2. You need to download the latest work in progress on the 3.0.x.x_Maintenance branch on GitHub, which in not an official release.straightlight wrote: ↑Fri Jul 14, 2023 7:25 pmThat's why I said: the most recent OC v3.0.3.8 release.
Which is why, no official release was mentioned rather than the most recent.ADD Creative wrote: ↑Fri Jul 14, 2023 9:42 pmThe most recent release of 3.x was in 2021. There have been no releases of 3.x compatible with PHP 8.2. You need to download the latest work in progress on the 3.0.x.x_Maintenance branch on GitHub, which in not an official release.straightlight wrote: ↑Fri Jul 14, 2023 7:25 pmThat's why I said: the most recent OC v3.0.3.8 release.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
You said the most recent release which would be 3.0.3.8 from 2021, which is something different to the 3.0.x.x_Maintenance branch. Apologies, my comment was not aimed at you rather for anyone else viewing the topic .straightlight wrote: ↑Fri Jul 14, 2023 9:43 pmWhich is why, no official release was mentioned rather than the most recent.
Users browsing this forum: No registered users and 13 guests