Jump to content

500 Server Error when registering with cyrillic firstname


stasinus

Recommended Posts

Hi all,

During registration (in front office) when entering cyrillic firstname the 500 Server Error arised.

The details are:

[PrestaShopException]

Property Customer->firstname is not valid
at line 866 in file classes/ObjectModel.php

861.
862.             $message = $this->validateField($field, $this->$field);
863.             if ($message !== true)
864.             {
865.                 if ($die)
866.                     throw new PrestaShopException($message);
867.                 return $error_return ? $message : false;
868.             }
869.         }
870.
871.         return true;

But it's weird - I was able to register with some cyrillic names, but most are not acceptable. So looks like it's not a general issue with utf-8.

Where to dig?

Thanks for the replies. 

Link to comment
Share on other sites

it's not default behaviour in prestashop.

try with this:

 

go to /classes/Customer.php

 

find line:
 

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

change 'validate' => 'isName' to 'validate' => 'isAnything'

Link to comment
Share on other sites

it's not default behaviour in prestashop.

try with this:

 

go to /classes/Customer.php

 

find line:

 

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

change 'validate' => 'isName' to 'validate' => 'isAnything'

Hi Vekia,

Thanks for your suggestion. I've done the change and able to register. However the name is being cut, so the issue still exist.

I'm trying to register user, for example, with name "Станислав". After registration in the top right column the name is being displayed as: "С��ани��лав". However the value in the DB is just "С" (and the value in the form when I go to the "Edit my details" page).

The form works perfect in BO - I'm able to change name in BO after user registration without any issues.

Will try to make a copy of site, switch to default theme and check.

Any further suggestions meanwhile?

Link to comment
Share on other sites

Unfortunately no, this is not the same issue. Looks like here is an issue with some characters (or even a set of characters) no matter what is a length of a string

Link to comment
Share on other sites

×
×
  • Create New...