Prestashop: Upgraded from 1.6.1.23 to 1.6.1.24: Page error 500 after insert customer details

Created on 6 Jul 2019  路  10Comments  路  Source: PrestaShop/PrestaShop

Describe the bug
After the upgrade, when i make a order and clicking checkout it just trow a white page with error 500. on nginx log i got this message:
2019/07/05 19:55:32 [error] 1426#1426: *2351026 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Validate::isCustomerName() in /var/www/sanitariacamporomano.com/classes/ObjectModel.php:1160
Stack trace:

0 /var/www/sanitariacamporomano.com/controllers/front/AuthController.php(437): ObjectModelCore->validateController()

1 /var/www/sanitariacamporomano.com/controllers/front/AuthController.php(256): AuthControllerCore->processSubmitAccount()

2 /var/www/sanitariacamporomano.com/classes/controller/Controller.php(178): AuthControllerCore->postProcess()

3 /var/www/sanitariacamporomano.com/classes/Dispatcher.php(367): ControllerCore->run()

4 /var/www/sanitariacamporomano.com/index.php(28): DispatcherCore->dispatch()

5 {main}

thrown in /var/www/sanitariacamporomano.com/classes/ObjectModel.php on line 1160" while reading response header from upstream, client: 188.114.102.163, server: www.sanitariacamporomano.com, request: "POST /it/login HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "sanitariacamporomano.com", referrer: "https://sanitariacamporomano.com/it/login?back=https%3A%2F%2Fsanitariacamporomano.com%2Fit%2Fordine%3Fstep%3D1&display_guest_checkout=1"

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'www.sanitariacamporomano.com'
  2. Try to do a order as new user
  3. click chceckout
  4. See error

Additionnal information
PrestaShop version: 1.6.1.24
PHP version: 7.2

1.6.1.24 Autoupgrade No change required

Most helpful comment

@xion87, in your BO => Advanced Parameters => Performance => enable the "Disable all overrides" option, clear cache & feedback.

Thanks!

I done that and now the is no more the error and was able to complete checkout :D

All 10 comments

Hi, have you tried downlograding php first of all?
https://devdocs.prestashop.com/1.7/basics/installation/system-requirements/
Was your previous shop running the same PHP version?

yeah 1.6.1.23 was working without issue

Cleared cache? Enable debugging ? any error?

Yeah, cleared cache and stuff, the error log that appaer also with debuging is the same:
2019/07/05 19:55:32 [error] 1426#1426: *2351026 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Validate::isCustomerName() in /var/www/sanitariacamporomano.com/classes/ObjectModel.php:1160
Stack trace:

0 /var/www/sanitariacamporomano.com/controllers/front/AuthController.php(437): ObjectModelCore->validateController()

1 /var/www/sanitariacamporomano.com/controllers/front/AuthController.php(256): AuthControllerCore->processSubmitAccount()

2 /var/www/sanitariacamporomano.com/classes/controller/Controller.php(178): AuthControllerCore->postProcess()

3 /var/www/sanitariacamporomano.com/classes/Dispatcher.php(367): ControllerCore->run()

4 /var/www/sanitariacamporomano.com/index.php(28): DispatcherCore->dispatch()

5 {main}

thrown in /var/www/sanitariacamporomano.com/classes/ObjectModel.php on line 1160" while reading response header from upstream, client: 188.114.102.163, server: www.sanitariacamporomano.com, request: "POST /it/login HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "sanitariacamporomano.com", referrer: "https://sanitariacamporomano.com/it/login?back=https%3A%2F%2Fsanitariacamporomano.com%2Fit%2Fordine%3Fstep%3D1&display_guest_checkout=1"

Check any override in place by some module , anything there?

2019/07/05 19:55:32 [error] 1426#1426: *2351026 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Validate::isCustomerName() in

Validate::isCustomerName() is a new function created for PS 1.6.1.24 (to counter spam attacks) as you can see it here:
https://github.com/PrestaShop/PrestaShop/blob/1.6.1.x/classes/Validate.php#L158

1) Check the file classes/Validate.php is correctly updated and contains this new function
2) If not, something went bad with your upgrade. It can happen because of installed overrides, modules and themes.
3) If yes, then the function is there but is not recognized. Maybe restart php server ?

Also although you say PS 1.6.1.23 was running fine with php7.2 it should not. PrestaShop 1.6 is supposed to run fine with php7.0 and php7.1 but not php7.2 . Some functions/features will not work.

  1. The file seem correct and upgraded with latest version
  2. i am using zero theme, but i tested the default theme, having the same issues
  3. i restarted the vps, same result
    I am using php 7.0 (on the macchine i use multiple 7 version but prestashop use 7.0)
    Also i never update the theme with new updates (using the one-click upgrade)

WIth debug i get the error on that 500 err page:

Fatal error: Uncaught Error: Call to undefined method Validate::isCustomerName() in /var/www/sanitariacamporomano.com/classes/ObjectModel.php:1160 Stack trace: #0 /var/www/sanitariacamporomano.com/controllers/front/AuthController.php(437): ObjectModelCore->validateController() #1 /var/www/sanitariacamporomano.com/controllers/front/AuthController.php(256): AuthControllerCore->processSubmitAccount() #2 /var/www/sanitariacamporomano.com/classes/controller/Controller.php(178): AuthControllerCore->postProcess() #3 /var/www/sanitariacamporomano.com/classes/Dispatcher.php(367): ControllerCore->run() #4 /var/www/sanitariacamporomano.com/index.php(28): DispatcherCore->dispatch() #5 {main} thrown in /var/www/sanitariacamporomano.com/classes/ObjectModel.php on line 1160

@xion87, in your BO => Advanced Parameters => Performance => enable the "Disable all overrides" option, clear cache & feedback.

Thanks!

@xion87, in your BO => Advanced Parameters => Performance => enable the "Disable all overrides" option, clear cache & feedback.

Thanks!

I done that and now the is no more the error and was able to complete checkout :D

@xion87, so your issue is not a PrestaShop core.
You have an override which is not compatible with your Project.
https://github.com/PrestaShop/PrestaShop/tree/1.6.1.x/override
I close the issue, feel free to open a new one when needed.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings