yog_sothoth Posted May 22, 2013 Share Posted May 22, 2013 Buenas a todos, Ojalá alguien pueda ayudarme, he buscado pero no he encontrado nada relacionado: La cosa es que al intentar modificar una dirección ya existente me da el error siguiente con el MOD_DEV true desde defines.inc.php Aún cambiando el tema de un custom al "default" el problema persiste. Por favor que alguien me eche un cable. Gracias de antemano. (Prestashop 1.5.4) [PrestaShopException] Property Address->dni 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] 259. * 260. * @return array All object fields 261. */ 262. public function getFields() 263. { 264. $this->validateFields(); 265. $fields = $this->formatFields(self::FORMAT_COMMON); 266. 267. // For retro compatibility 268. if (Shop::isTableAssociated($this->def['table'])) 269. $fields = array_merge($fields, $this->getFieldsShop()); ObjectModelCore->getFields - [line 599 - classes/ObjectModel.php] - [0 Argument] 593. $id_shop_list = $this->id_shop_list; 594. 595. if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default) 596. $this->id_shop_default = min($id_shop_list); 597. // Database update 598. if (!$result = ObjectModel::$db->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values)) 599. return false; 600. 601. // Database insertion for multishop fields related to the object 602. if (Shop::isTableAssociated($this->def['table'])) 603. { ObjectModelCore->update - [line 186 - classes/Address.php] - [1 Arguments] 180. if (isset(self::$_idCountries[$this->id])) 181. unset(self::$_idCountries[$this->id]); 182. if (isset(self::$_idZones[$this->id])) 183. unset(self::$_idZones[$this->id]); 184. 185. return parent::update($null_values); 186. } 187. 188. /** 189. * @see ObjectModel::delete() 190. */ AddressCore->update - [line 202 - classes/Address.php] - [0 Argument] 196. if (!$this->isUsed()) 197. return parent::delete(); 198. else 199. { 200. $this->deleted = true; 201. return $this->update(); 202. } 203. } 204. 205. /** 206. * Returns fields required for an address in an array hash AddressCore->delete - [line 197 - controllers/front/AddressController.php] - [0 Argument] 191. $address->id_state = 0; 192. $address_old = $this->_address; 193. if (Customer::customerHasAddress($this->context->customer->id, (int)$address_old->id)) 194. { 195. if ($address_old->isUsed()) 196. $address_old->delete(); 197. else 198. { 199. $address->id = (int)($address_old->id); 200. $address->date_add = $address_old->date_add; 201. } AddressControllerCore->processSubmitAddress - [line 106 - controllers/front/AddressController.php] - [0 Argument] 100. * @see FrontController::postProcess() 101. */ 102. public function postProcess() 103. { 104. if (Tools::isSubmit('submitAddress')) 105. $this->processSubmitAddress(); 106. else if (!Validate::isLoadedObject($this->_address) && Validate::isLoadedObject($this->context->customer)) 107. { 108. $_POST['firstname'] = $this->context->customer->firstname; 109. $_POST['lastname'] = $this->context->customer->lastname; 110. $_POST['company'] = $this->context->customer->company; AddressControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] 152. // setMedia MUST be called before postProcess 153. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) 154. $this->setMedia(); 155. 156. // postProcess handles ajaxProcess 157. $this->postProcess(); 158. 159. if (!empty($this->redirect_after)) 160. $this->redirect(); 161. 162. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) ControllerCore->run - [line 349 - classes/Dispatcher.php] - [0 Argument] 343. // Execute hook dispatcher 344. if (isset($params_hook_action_dispatcher)) 345. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 346. 347. // Running controller 348. $controller->run(); 349. } 350. catch (PrestaShopException $e) 351. { 352. $e->displayMessage(); 353. } DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] 22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 23. * International Registered Trademark & Property of PrestaShop SA 24. */ 25. 26. require(dirname(__FILE__).'/config/config.inc.php'); 27. Dispatcher::getInstance()->dispatch(); 28. Link to comment Share on other sites More sharing options...
yog_sothoth Posted May 22, 2013 Author Share Posted May 22, 2013 Olvidé apuntar que el error se da solo con direcciones antiguas o dadas de alta con versiones anteriores de prestashop, o posiblemente de direcciones importadas desde OSCommerce, las más antiguas de mi tienda. Saludos, Link to comment Share on other sites More sharing options...
nadie Posted May 22, 2013 Share Posted May 22, 2013 Olvidé apuntar que el error se da solo con direcciones antiguas o dadas de alta con versiones anteriores de prestashop, o posiblemente de direcciones importadas desde OSCommerce, las más antiguas de mi tienda. Saludos, Dime que tienes en la tabla: ps_customer en el valor del campo "dni", en los clientes que te falla. (Vamos que me digas, si verdaderamente esta vacio o no..) Link to comment Share on other sites More sharing options...
rondatec Posted July 4, 2013 Share Posted July 4, 2013 A mi me pasa algo parecido, cuando voy a formalizar un pedido, introduzco todos los datos y antes de seleccionar el tipo de pago cambio algun dato de los de direccion de envio o cliente y me dice eneable save adresses ¿alguien podria ayudarme? La versión es 1.5.4 Gracias de antemano Link to comment Share on other sites More sharing options...
Recommended Posts