stasinus Posted January 8, 2015 Share Posted January 8, 2015 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 validat 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; ObjectModelCore->validateFields - [line 272 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 480 - classes/ObjectModel.php] ObjectModelCore->add - [line 225 - classes/Customer.php] - [2 Arguments] CustomerCore->add - [line 430 - controllers/front/AuthController.php] AuthControllerCore->processSubmitAccount - [line 240 - controllers/front/AuthController.php] AuthControllerCore->postProcess - [line 171 - classes/controller/Controller.php] ControllerCore->run - [line 374 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] 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 More sharing options...
stasinus Posted January 12, 2015 Author Share Posted January 12, 2015 Anybody? Any ideas? Link to comment Share on other sites More sharing options...
vekia Posted January 12, 2015 Share Posted January 12, 2015 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 More sharing options...
stasinus Posted January 18, 2015 Author Share Posted January 18, 2015 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 More sharing options...
El Patron Posted January 19, 2015 Share Posted January 19, 2015 maybe you will find this post useful https://www.prestashop.com/forums/topic/326434-%D0%BE%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D0%B8%D1%81%D0%B5%D0%BC-%D1%81-%D1%83%D0%B2%D0%B5%D0%B4%D0%BE%D0%BC%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%D0%BC-%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D1%83/?do=findComment&comment=1670799 Link to comment Share on other sites More sharing options...
stasinus Posted January 19, 2015 Author Share Posted January 19, 2015 maybe you will find this post useful https://www.prestashop.com/forums/topic/326434-%D0%BE%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D0%B8%D1%81%D0%B5%D0%BC-%D1%81-%D1%83%D0%B2%D0%B5%D0%B4%D0%BE%D0%BC%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%D0%BC-%D0%BA%D0%BB%D0%B8%D0%B5%D0%BD%D1%82%D1%83/?do=findComment&comment=1670799 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 More sharing options...
stasinus Posted January 22, 2015 Author Share Posted January 22, 2015 Hi all, Tried default theme - the same issue. Please advise, it stops site to go live This should not be an issue with hosting as the form works fine in BO. So probably some validation/encoding transform in FO code? Link to comment Share on other sites More sharing options...
El Patron Posted January 22, 2015 Share Posted January 22, 2015 gosh sorry you are still having this issue. open a forge report here: http://forge.prestashop.com/ please then post url of that report back here. Link to comment Share on other sites More sharing options...
stasinus Posted January 23, 2015 Author Share Posted January 23, 2015 Hi El Patron, JIRA http://forge.prestashop.com/browse/PSCSX-4444 created. Please let me know should you want me to send you site address/ftp account/BO access for investigation. 1 Link to comment Share on other sites More sharing options...
Recommended Posts