Jeet Kune Do Posted January 16, 2015 Share Posted January 16, 2015 When I'm trying to create an order I got the server error 500. When enable debug mode I get this error: [PrestaShopException] Property Order->payment is empty 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; ObjectModelCore->validateFields - [line 272 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 299 - classes/order/Order.php] OrderCore->getFields - [line 480 - classes/ObjectModel.php] ObjectModelCore->add - [line 304 - classes/order/Order.php] - [2 Arguments] OrderCore->add - [line 335 - classes/PaymentModule.php] PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments] BankwireValidationModuleFrontController->postProcess - [line 171 - classes/controller/Controller.php] ControllerCore->run - [line 374 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] When I creat the order with cash on delivery everything is working like it should. Under MODULES / POSITIONS There is no text and everything has the same images. Also in the dashbord there is no text When I want to configure whatever module there is no text in the save icon. Prestashop version 1.6.0.11 Please let me know if you need additional information. Thank you in advance! Best regards! Jeet Link to comment Share on other sites More sharing options...
Jeet Kune Do Posted January 16, 2015 Author Share Posted January 16, 2015 Also under live edit there is no text shown. Link to comment Share on other sites More sharing options...
rytiz2873 Posted January 16, 2015 Share Posted January 16, 2015 can you click on arguments: "PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments]" and show what is in it? 1 Link to comment Share on other sites More sharing options...
Jeet Kune Do Posted January 16, 2015 Author Share Posted January 16, 2015 can you click on arguments: "PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments]" and show what is in it? I opened all, didn't know for this option. [PrestaShopException] Property Order->payment is empty 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; ObjectModelCore->validateFields - [line 272 - classes/ObjectModel.php] 267. * 268. * @return array All object fields 269. */ 270. public function getFields() 271. { 272. $this->validateFields(); 273. $fields = $this->formatFields(self::FORMAT_COMMON); 274. 275. // For retro compatibility 276. if (Shop::isTableAssociated($this->def['table'])) 277. $fields = array_merge($fields, $this->getFieldsShop()); ObjectModelCore->getFields - [line 299 - classes/order/Order.php] 294. public function getFields() 295. { 296. if (!$this->id_lang) 297. $this->id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, $this->id_shop); 298. 299. return parent::getFields(); 300. } 301. 302. public function add($autodate = true, $null_values = true) 303. { 304. if (parent::add($autodate, $null_values)) OrderCore->getFields - [line 480 - classes/ObjectModel.php] 475. } 476. 477. // Database insertion 478. if (Shop::checkIdShopDefault($this->def['table'])) 479. $this->id_shop_default = min($id_shop_list); 480. if (!$result = ObjectModel::$db->insert($this->def['table'], $this->getFields(), $null_values)) 481. return false; 482. 483. // Get object id in database 484. $this->id = ObjectModel::$db->Insert_ID(); 485. ObjectModelCore->add - [line 304 - classes/order/Order.php] - [2 Arguments] 299. return parent::getFields(); 300. } 301. 302. public function add($autodate = true, $null_values = true) 303. { 304. if (parent::add($autodate, $null_values)) 305. return SpecificPrice::deleteByIdCart($this->id_cart); 306. return false; 307. } 308. 309. public function getTaxCalculationMethod() OrderCore->add - [line 335 - classes/PaymentModule.php] 330. 331. if (self::DEBUG_MODE) 332. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order is about to be added', 1, null, 'Cart', (int)$id_cart, true); 333. 334. // Creating order 335. $result = $order->add(); 336. 337. if (!$result) 338. { 339. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order cannot be created', 3, null, 'Cart', (int)$id_cart, true); 340. throw new PrestaShopException('Can\'t save Order'); PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments] 59. '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'), 60. '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), 61. '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')) 62. ); 63. 64. $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); 65. Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key); 66. } 67. } BankwireValidationModuleFrontController->postProcess - [line 171 - classes/controller/Controller.php] 166. // setMedia MUST be called before postProcess 167. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) 168. $this->setMedia(); 169. 170. // postProcess handles ajaxProcess 171. $this->postProcess(); 172. 173. if (!empty($this->redirect_after)) 174. $this->redirect(); 175. 176. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) ControllerCore->run - [line 374 - classes/Dispatcher.php] 369. // Execute hook dispatcher 370. if (isset($params_hook_action_dispatcher)) 371. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 372. 373. // Running controller 374. $controller->run(); 375. } 376. catch (PrestaShopException $e) 377. { 378. $e->displayMessage(); 379. } DispatcherCore->dispatch - [line 28 - index.php] 23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24. * International Registered Trademark & Property of PrestaShop SA 25. */ 26. 27. require(dirname(__FILE__).'/config/config.inc.php'); 28. Dispatcher::getInstance()->dispatch(); Link to comment Share on other sites More sharing options...
rytiz2873 Posted January 20, 2015 Share Posted January 20, 2015 Done. Link to comment Share on other sites More sharing options...
Jeet Kune Do Posted January 20, 2015 Author Share Posted January 20, 2015 Done. I would like to thank you for your help, surrely enought you know your things. Link to comment Share on other sites More sharing options...
hardware Posted February 2, 2015 Share Posted February 2, 2015 I would like to thank you for your help, surrely enought you know your things. Done. Please, Can you help me? .... How fixed? Doesn´t work Paypal, Bankwire and check .... it´s terrible! I don´t know is problem params , for example argument 3 ... I had tried much options for fixed this problem and I found your post For example, bankire: PaymentModuleCore->validateOrder - [line 64 - modules/bankwire/controllers/front/validation.php] - [9 Arguments]59. '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),60. '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')), 61. '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS')) 62. ); 63. 64. $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); 65. Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key); 66. } 67. } Argument [0]27022 Argument [1] 10 Argument [2] 19.45 Argument [3] Argument [4] Argument [5] Array ( [{bankwire_owner}] => dgdfg [{bankwire_details}] => dgdsg [{bankwire_address}] => dgdsgf ) Argument [6] 1 Argument [7] Argument [8] a740aa2fc14afa7f27040e7cec17ab2c Link to comment Share on other sites More sharing options...
rytiz2873 Posted February 2, 2015 Share Posted February 2, 2015 If you want fast fix, find in module files validate function as change"configuration:get(ps_os_bankwire)" to simple string, which should be module name Link to comment Share on other sites More sharing options...
hardware Posted February 2, 2015 Share Posted February 2, 2015 If you want fast fix, find in module files validate function as change"configuration:get(ps_os_bankwire)" to simple string, which should be module name Yesssssssssss It´s working Thanks a lot Link to comment Share on other sites More sharing options...
rytiz2873 Posted February 2, 2015 Share Posted February 2, 2015 you're welcome and i don't know why prestashop do this. this is not very good solution, but it is fast solution ;D Link to comment Share on other sites More sharing options...
Hrusoo Posted February 27, 2015 Share Posted February 27, 2015 I have the same problem, but also by bankwire and cash on delivery. I don´t know, what can I do. Can you help me? In log is: *ERROR* 2015/02/27 - 20:19:20: Property Order->payment is empty at line 866 in file classes/ObjectModel.php line 866 in ObjectModel. php is: throw new PrestaShopException($message); and in line 64 in Validation.php is: $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); Can you help me? Thanx Link to comment Share on other sites More sharing options...
rytiz2873 Posted February 27, 2015 Share Posted February 27, 2015 This is becouse somehow didnt get payment name, you can add it manually to fast fix Link to comment Share on other sites More sharing options...
Hrusoo Posted February 28, 2015 Share Posted February 28, 2015 Can you write more details? Where have to fix this? Thx Link to comment Share on other sites More sharing options...
rytiz2873 Posted February 28, 2015 Share Posted February 28, 2015 and in line 64 in Validation.php is: $this->module->validateOrder(..... in module Link to comment Share on other sites More sharing options...
tien.tran2401 Posted April 22, 2015 Share Posted April 22, 2015 (edited) Hello guys, I have the same problem, @rytiz2873 I followed you step by step but it still error, Can you help me ? Thanks Edited April 22, 2015 by tien.tran2401 (see edit history) Link to comment Share on other sites More sharing options...
Hrusoo Posted April 22, 2015 Share Posted April 22, 2015 You have change from: $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); to: $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, bankwire, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key); also in other payment methods... Link to comment Share on other sites More sharing options...
Recommended Posts