Jump to content

Address exception error


Recommended Posts

I was trying to delete the default manufacturers address (Steve Jobs etc) and when i clicked delete the following error message appeared on the new screen:

 

[PrestaShopException]

 

Property Address->address2 is empty

at line 837 in file classes/ObjectModel.php

 

831.

832. $message = $this->validateField($field, $this->$field);

833. if ($message !== true)

834. {

835. if ($die)

836. throw new PrestaShopException($message);

837. return $error_return ? $message : false;

838. }

839. }

840.

841. return true;

ObjectModelCore->validateFields - [line 265 - classes/ObjectModel.php] - [0 Argument]

ObjectModelCore->getFields - [line 599 - classes/ObjectModel.php] - [0 Argument]

ObjectModelCore->update - [line 186 - classes/Address.php] - [1 Arguments]

AddressCore->update - [line 634 - classes/controller/AdminController.php] - [0 Argument]

AdminControllerCore->processDelete - [line 539 - classes/controller/AdminController.php] - [0 Argument]

AdminControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument]

ControllerCore->run - [line 349 - classes/Dispatcher.php] - [0 Argument]

DispatcherCore->dispatch - [line 50 - admin123/index.php] - [0 Argument]

 

I haven't got a clue what this means, but I guess that it is related to other issues that I have,

- that I cannot set a supplier up (it keeps telling me address 2 and other need to be filled in even when there is something in every box,

- when a user creates an account in the front end as part of the account creation process this is also stopped from doing so unless address2 and other are filled in.

 

Can anyone please help with this?

Link to comment
Share on other sites

  • 2 years later...

Search a long time for this.

My solution was to edit classes/Adress.php

 

Change:

'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128),
to
'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128),
 

 

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...