Jump to content

[SOLVED] PS 1.6.0.9 - Please help - customers can not register account


Recommended Posts

Suddenly, there is not possible to create account.

 

Errormessage when set PS_MODE_DEV to true is:

 

Fatal error: Uncaught Error: Access to undeclared static property: Validate::$data in /home/account/public_html/classes/ObjectModel.php:1113 Stack trace: #0 /home/account/public_html/controllers/front/AuthController.php(414): ObjectModelCore->validateController() #1 /home/account/public_html/controllers/front/AuthController.php(243): AuthControllerCore->processSubmitAccount() #2 /home/account/public_html/classes/controller/Controller.php(171): AuthControllerCore->postProcess() #3 /home/account/public_html/classes/Dispatcher.php(373): ControllerCore->run() #4 /home/account/public_html/index.php(28): DispatcherCore->dispatch() #5 {main} thrown in /home/account/public_html/classes/ObjectModel.php on line 1113

 

 

Anyone?

 

EDIT: FOUND THE ERROR!

It was my host that updated to PHP 7. I downgraded it via cpanel to PHP version 5.5, and everything is running smoothly again. :D

Edited by Gomlers (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

The major problem is about the registration, and it is solved as described in the post i linked. To make it clear, it is editing classes/ObjectModel.php
Replace

!Validate::$data['validate']($value)

with

!call_user_func('Validate::'.$data['validate'],$value)


But there are some other little problems that i fixed. Take note...

1) If you see some errors in the server log, about Deprecated, and Warning messages, about PEAR. Edit the file: prestashop/tools/pear/PEAR.php

Replace 

function PEAR($error_class = null) 

with

function __construct($error_class = null)

Then also replace

function PEAR_Error($message = 'unknown error', $code = null,

with

function __construct($message = 'unknown error', $code = null,

 

2) There could be some problems with SMARTY variables not defined in templates (.tpl) of theme or modules, you have a broken page and a server log with Fatal Error. You solve in many ways, it depends on the template you are fixing. You could try the following:

A. If you know the default value that the variable should have, then define it before it is called, at the beginning of the template, like this (ex.: i give 3 elements per line as default):

{if empty($nbItemsPerLine)}
 {assign var="nbItemsPerLine" value="3"}
{/if}


B. If you can't know the default value, try adding a conditional statement like this where the variable is called:

{if isset($label)}
... do the things with $label...
{/if}


C. If the variable is never used, so it was forgotten during development, then delete it straight forward.

 

3)  There is another weird error, but it was affecting a PS 1.5, the products list (in admin), was broken. The log is: "Fatal error: Unsupported operand types in controllers/admin/AdminProductsController.php on line 859"

To fix this you need to remove the "+" signs at the beginning of two rows hinted by the log (imo it was a mistake of copy/paste from Github).

+                                Array(),
+                                Tools::getValue('available_date_attribute')

 

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

New errors discovered, same logic on validation problem,  This time the Fatal Error is in BO, edit the file in classes/controller/AdminController.php

Search the function processUpdateOptions at about row 1383 replace

if (!Validate::$values['validation'](Tools::getValue($field.'_'.$language['id_lang']))) {

with

if (!call_user_func('Validate::'.$values['validation'],Tools::getValue($field.'_'.$language['id_lang']))) {

 

Then, same function, few rows below, at about row 1391 replace

if (!Validate::$values['validation'](Tools::getValue($field))) {

with

if (!call_user_func('Validate::'.$values['validation'],Tools::getValue($field))) {

 

Search the function validateField at about row 3628 replace

if (!Validate::$field['validation']($value)) {

with

if (!call_user_func('Validate::'.$field['validation'],$value)) {
  • Like 1
Link to comment
Share on other sites

  • 6 years later...

Good morning

I did this:

!Validate::$data['validate']($value)

with

!call_user_func('Validate::'.$data['validate'],$value)

But now all new users are registered WITHOUT validated by me. How to solve?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...