Prestashop: Customers cannot login or new customers register after upgrading 1.6.1.24 to 1.7.6.2

Created on 13 Jan 2020  路  14Comments  路  Source: PrestaShop/PrestaShop

After a lengthy battle to upgrade our store I currently have a test environment where I have managed to work through a lot of the problems yet face one last challenge. Basically, customers cannot log in, just reverts back to the log in screen, although when browsing and adding anything to a cart, then going to checkout and THEN logging in it works but leaving the checkout then appears to log the customer out again. Similarly, trying to register a new account shows debug info:

The length of property Customer->passwd is currently 60 chars. It must be between 0 and 32 chars.
at line 1003 in file classes/ObjectModel.php

I've done the obvious and tried amending this in the dbase but makes no difference.
Similarly, I've cleared and reset just about every cache and module I can think of, including browser cache, etc,

1.7.6.2 Autoupgrade Bug Customer FO No change required

Most helpful comment

AND lo and behold, editing override/classes/customer.php was showing:

'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32)

edited 32=>60 and log in successful !!

All 14 comments

Hi @markopolo2002,

I tried with PS1.7.6.2 fresh install.
When I try to create a customer with a password's length > 60 characters => well created.
I did not manage to reproduce the issue with PS1.7.6.2 after an upgrade from PS1.6.1.24 using the 1-click upgrade v4.10.1.
I attached a screen record
https://drive.google.com/file/d/1OLgALPeeqPcK6Ycenj8KHp94gh8yO6-7/view
What is the exact version of the 1-click upgrade did you use?
Have you any errors during the upgrade?
Creating new customers is well working in your case?

Thanks!

Hello, sorry for the delay in replying, was away for a few days :)
Originally, I updated manually, copied all files, etc, ran /install/upgrade/upgrade.php and got:

This page contains the following errors:
error on line 1021 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.

Managed to log into the backend anyway and had to replace the ps_access table as per most people, then access was good but then couldn't update listings that had attributes, etc and still couldn't log in as a customer or register a new account.

Eventually I managed to figure that the default language was causing issues, had GB default with EN disabled but installed, restored the site, enabled EN as well and ran another upgrade and now access to edit listings OK but STILL cannot log in or register as a customer.

Attempted another upgrade, this time 1-click-update and made sure I updated the module to 4.10.1, this time the upgrade went through successfully but STILL cannot login as a customer or register a new account. Attempting to register a new user just shows:

The length of property Customer->passwd is currently 60 chars. It must be between 0 and 32 chars.
at line 1003 in file classes/ObjectModel.php

Trying to register a new customer from the BO shows:

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0]

I can add an item to the cart, and then at the checkout I CAN log in as a customer as it shows the customers address, but still unable to register as a guest from checkout. However, once you remove the item from the cart, the user is no longer logged in it appears.

To create the test environment, I exported both the home dir and dbase and then imported them into the test site, once the test site was up and running I ran the upgrade.

I still have the test environment available if anyone wants to have admin access to it and I've pretty much listed everything I've done during the upgrade here in case someone can spot something I've maybe not done: https://www.prestashop.com/forums/topic/1012148-another-failed-upgrade/
Thanks in advance
Marko

@markopolo2002, could you please provide me a screenshot from the structure of your table ps_customer

image

Thanks!

As requested, looks pretty similar :)
ps_customer_structure

@markopolo2002, did you use any custom module to create an account or signing in?
Thanks to check if you have some overrides, they could be not compatible with PS1.7.6.2.

Thanks!

As far as I am aware, we have never used any additional means of creating or logging into an account at all, we've always left the registration and sign in process as it came by default, as for overrides, I believe we've always had these disabled, and even then I wouldn't be 100% sure how or when to use overrides in any event.

@markopolo2002,

as for overrides, I believe we've always had these disabled

Did you disable the overrides from the BO => Advanced Parameters => Performance page?
image

Thanks!

Yes, but I can't be sure when we disabled them if they come enabled by default, but this would have been long before the upgrade as when we went to disable them before updating on the advice given in the prestashop forums, we noticed they were already disabled and would likely have done this some time ago, as I say we have no reason to use these or a great deal of understanding what they would be used for therefore would have no use for them.

@markopolo2002, the Disable override button not working is not working in PrestaShop as reported here: https://github.com/PrestaShop/PrestaShop/issues/14596
So, please check if you have any override manually in all folders: https://github.com/PrestaShop/PrestaShop/tree/develop/override

Thanks!

As I say, I'm not familiar with what overrides are or what they are used for therefore I'm not entirely sure what it is I'm looking for, would it be easier for me to list what I find in those folders?
Thanks

Additionally, I upgraded directly to 1.7.6.2, is that bug still relevant for that version?

OK, still not entirely sure if its relevant, but I went through the list at https://github.com/PrestaShop/PrestaShop/tree/develop/override and compared them to our own folder structure and note that we have the following additional files present:
override/classes/customer.php
override/classes/dispatcher.php
override/classes/link.php
override/classes/validate.php
override/classes/controller/FrontController.php
override/controller/categorycontroller.php
override/controller/cmdcontroller.php
override/controller/contactcontroller.php
override/controller/manufacturercontroller.php
override/controller/productcontroller.php
override/controller/suppliercontroller.php

AND lo and behold, editing override/classes/customer.php was showing:

'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32)

edited 32=>60 and log in successful !!

@markopolo2002, Great!
It is not a Prestashop issue, I will close the ticket, feel free to open a new one when needed.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings