alebnight Posted March 16, 2018 Share Posted March 16, 2018 Hi, I'm getting an error 500 when finishing 2nd step of the order process. ADDRESSES Here, when I click [Continuar/next/proceed], it's sends me to a 500 page. This is the shop of some friends, I think they remove one of carriers and then this started to happen. Switching to debug and reloading right in the 500 page give me this: [PrestaShopException] La propiedad Address->lastname está vacía. at line 944 in file classes/ObjectModel.php 939. } 940. 941. $message = $this->validateField($field, $this->$field); 942. if ($message !== true) { 943. if ($die) { 944. throw new PrestaShopException($message); 945. } 946. return $error_return ? $message : false; 947. } 948. } 949. ObjectModelCore->validateFields - [line 272 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 518 - classes/ObjectModel.php] ObjectModelCore->add - [line 174 - classes/Address.php] - [2 Arguments] AddressCore->add - [line 476 - classes/ObjectModel.php] - [2 Arguments] ObjectModelCore->save - [line 76 - classes/form/CustomerAddressPersister.php] CustomerAddressPersisterCore->save - [line 163 - classes/form/CustomerAddressForm.php] - [2 Arguments] CustomerAddressFormCore->submit - [line 111 - classes/checkout/CheckoutAddressesStep.php] CheckoutAddressesStepCore->handleRequest - [line 57 - classes/checkout/CheckoutProcess.php] - [1 Arguments] CheckoutProcessCore->handleRequest - [line 202 - controllers/front/OrderController.php] - [1 Arguments] OrderControllerCore->initContent - [line 205 - classes/controller/Controller.php] ControllerCore->run - [line 379 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Screenshot: However, if I try to replicate this by ordering again, instead of going to the order page I get this, Whoops, looks like something went wrong. 1/1 ContextErrorException in smarty_internal_templatebase.php(157) : eval()'d code line 57: Notice: Undefined index: name in smarty_internal_templatebase.php(157) : eval()'d code line 57 at ErrorHandler->handleError('8', 'Undefined index: name', '/var/www/badeco/vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code', '57', array('_smarty_tpl' => object(Smarty_Dev_Template), '_from' => array('id_address' => array('name' => 'id_address', 'type' => 'hidden', 'required' => false, 'label' => '', 'value' => null, 'availableValues' => array(), 'maxLength' => null, 'errors' => array()), 'id_customer' => array('name' => 'id_customer', 'type' => 'hidden', 'required' => false, 'label' => '', 'value' => null, 'availableValues' => array(), 'maxLength' => null, 'errors' => array()), 'back' => array('name' => 'back', 'type' => 'hidden', 'required' => false, 'label' => '', 'value' => null, 'availableValues' => array(), 'maxLength' => null, 'errors' => array()), 'token' => array('name' => 'token', 'type' => 'hidden', 'required' => false, 'label' => '', 'value' => 'e619fb5b44a3c17b1519644bdd4f878d', 'availableValues' => array(), 'maxLength' => null, 'errors' => array()), 'alias' => array('name' => 'alias', 'type' => 'text', 'required' => false, 'label' => 'Alias', 'value' => null, 'availableValues' => array(), 'maxLength' => '32', 'errors' => array()), 'address1' => array('name' => 'address1', 'type' => 'text', 'required' => true, 'label' => 'Dirección', 'value' => null, 'availableValues' => array(), 'maxLength' => '128', 'errors' => array()), 'id_state' => array('name' => 'id_state', 'type' => 'select', 'required' => true, 'label' => 'Estado ', 'value' => null, 'availableValues' => array('Puente Alto', 'La Florida', 'Ñuñoa', 'Las Condes', 'Pirque', 'La Pintana', 'La Granja', 'San Joaquin', 'La Cisterna', 'El Bosque', 'San Bernardo', 'San Ramón', 'San Miguel', 'Peñalolen', 'Macul', 'La Reina', 'Providencia', 'Santiago', 'Estación Central', 'Pedro Aguirre Cerda', 'Cerrillos', 'Lo Espejo', 'Maipu', 'Padre Hurtado', 'Pudahuel', 'Lo Prado', 'Cerro Navia', 'Quilicura', 'Conchalí', 'Huechuraba', 'Vitacura', 'Renca', 'Lo Barnechea'), 'maxLength' => null, 'errors' => array()), 'city' => array('name' => 'city', 'type' => 'text', 'required' => true, 'label' => 'Ciudad', 'value' => null, 'availableValues' => array(), 'maxLength' => '64', 'errors' => array()), 'id_country' => array('name' => 'id_country', 'type' => 'countrySelect', 'required' => true, 'label' => 'País', 'value' => '68', 'availableValues' => array('Chile'), 'maxLength' => null, 'errors' => array()), 'phone_mobile' => array('name' => 'phone_mobile', 'type' => 'text', 'required' => false, 'label' => 'Teléfono móvil', 'value' => null, 'availableValues' => array(), 'maxLength' => '32', 'errors' => array()), 'firstname' => array('value' => 'Alexis'), 'lastname' => array('value' => 'Sanchez Reyes')))) in smarty_internal_templatebase.php(157) : eval()'d code line 57 at content_5aac37d8048217_51395463(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188 at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false) in SmartyDev.php line 60 at Smarty_Dev_Template->fetch() in AbstractForm.php line 119 at AbstractFormCore->render(array('file' => 'checkout/_partials/address-form.tpl', 'ui' => object(RenderableProxy), 'use_same_address' => true, 'type' => 'delivery', 'form_has_continue_button' => true)) in RenderableProxy.php line 52 at RenderableProxy->render(array('file' => 'checkout/_partials/address-form.tpl', 'ui' => object(RenderableProxy), 'use_same_address' => true, 'type' => 'delivery', 'form_has_continue_button' => true)) in smartyfront.config.inc.php line 94 at smartyRender(array('file' => 'checkout/_partials/address-form.tpl', 'ui' => object(RenderableProxy), 'use_same_address' => true, 'type' => 'delivery', 'form_has_continue_button' => true), object(Smarty_Dev_Template)) at call_user_func_array('smartyRender', array(array('file' => 'checkout/_partials/address-form.tpl', 'ui' => object(RenderableProxy), 'use_same_address' => true, 'type' => 'delivery', 'form_has_continue_button' => true), object(Smarty_Dev_Template))) in SmartyLazyRegister.php line 83 at SmartyLazyRegister->__call('smartyRender', array(array('file' => 'checkout/_partials/address-form.tpl', 'ui' => object(RenderableProxy), 'use_same_address' => true, 'type' => 'delivery', 'form_has_continue_button' => true), object(Smarty_Dev_Template))) in smarty_internal_templatebase.php(157) : eval()'d code line 88 at SmartyLazyRegister->smartyRender(array('file' => 'checkout/_partials/address-form.tpl', 'ui' => object(RenderableProxy), 'use_same_address' => true, 'type' => 'delivery', 'form_has_continue_button' => true), object(Smarty_Dev_Template)) in smarty_internal_templatebase.php(157) : eval()'d code line 88 at content_5aac37d7f29511_44444838(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188 at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false) in SmartyDev.php line 60 at Smarty_Dev_Template->fetch() in AbstractCheckoutStep.php line 94 at AbstractCheckoutStepCore->renderTemplate('checkout/_partials/steps/addresses.tpl', array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy)), array('address_form' => object(RenderableProxy), 'use_same_address' => true, 'use_different_address_url' => 'https://www.badeco.cl/pedido?use_same_address=0', 'new_address_delivery_url' => 'https://www.badeco.cl/pedido?newAddress=delivery', 'new_address_invoice_url' => 'https://www.badeco.cl/pedido?newAddress=invoice', 'id_address_delivery' => '0', 'id_address_invoice' => '0', 'show_delivery_address_form' => true, 'show_invoice_address_form' => false, 'form_has_continue_button' => true)) in CheckoutAddressesStep.php line 224 at CheckoutAddressesStepCore->render(array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy))) in RenderableProxy.php line 52 at RenderableProxy->render(array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy))) in smartyfront.config.inc.php line 94 at smartyRender(array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template)) at call_user_func_array('smartyRender', array(array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template))) in SmartyLazyRegister.php line 83 at SmartyLazyRegister->__call('smartyRender', array(array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template))) in smarty_internal_templatebase.php(157) : eval()'d code line 36 at SmartyLazyRegister->smartyRender(array('identifier' => 'checkout-addresses-step', 'position' => '2', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template)) in smarty_internal_templatebase.php(157) : eval()'d code line 36 at content_5aac37d7e1fb24_77867958(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188 at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false) in SmartyDev.php line 60 at Smarty_Dev_Template->fetch() in CheckoutProcess.php line 110 at CheckoutProcessCore->render(array('file' => 'checkout/checkout-process.tpl', 'ui' => object(RenderableProxy))) in RenderableProxy.php line 52 at RenderableProxy->render(array('file' => 'checkout/checkout-process.tpl', 'ui' => object(RenderableProxy))) in smartyfront.config.inc.php line 94 at smartyRender(array('file' => 'checkout/checkout-process.tpl', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template)) at call_user_func_array('smartyRender', array(array('file' => 'checkout/checkout-process.tpl', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template))) in SmartyLazyRegister.php line 83 at SmartyLazyRegister->__call('smartyRender', array(array('file' => 'checkout/checkout-process.tpl', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template))) in smarty_internal_templatebase.php(157) : eval()'d code line 140 at SmartyLazyRegister->smartyRender(array('file' => 'checkout/checkout-process.tpl', 'ui' => object(RenderableProxy)), object(Smarty_Dev_Template)) in smarty_internal_templatebase.php(157) : eval()'d code line 140 at content_5aac37d7c9d3c0_80689682(object(Smarty_Dev_Template)) in smarty_internal_templatebase.php line 188 at Smarty_Internal_TemplateBase->fetch('checkout/checkout.tpl', null, 'layouts/layout-left-column.tpl', null, false, true, false) in SmartyDev.php line 41 at SmartyDev->fetch('checkout/checkout.tpl', null, 'layouts/layout-left-column.tpl') in FrontController.php line 660 at FrontControllerCore->smartyOutputContent('checkout/checkout.tpl') in FrontController.php line 644 at FrontControllerCore->display() in Controller.php line 225 at ControllerCore->run() in Dispatcher.php line 379 at DispatcherCore->dispatch() in index.php line 28 Any help will be appreciated. Using Prestashop 1.7.2.2 Link to comment Share on other sites More sharing options...
alebnight Posted March 24, 2018 Author Share Posted March 24, 2018 Thanks Ndiaga. The theme is M4 fashion. I'm downloading the folder now ($DOCUMENT_ROOT/themes/M4Fashion) Where should I fill theme? Link to comment Share on other sites More sharing options...
sander Posted October 24, 2018 Share Posted October 24, 2018 I had similar problem, which was caused by address format: BO -> international -> locations -> {edit country} -> address format In my case there was a wrong syntax: "Customer:firstname lastname ... ", so I took the "Customer:" out and everything works again. Check all countries that your shop or browser might be associated with (Chile, Spain, England). If any of them has noticeably different address format than the rest of the countries, you can test out with other formats and see when problem occurs. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now