Jump to content

Error 500 when ordering


Recommended Posts

I got the following error when I try to order my cart. 

I use Prestashop 1.7 installed from scratch.

Please help me....

 

ContextErrorException in CustomerFormatter.php line 215:

Warning: Invalid argument supplied for foreach()
  1. in CustomerFormatter.php line 215
  2. at ErrorHandler->handleError('2', 'Invalid argument supplied for foreach()', '/home/aquamaew/www/boutique/classes/form/CustomerFormatter.php', '215', array('format' => array('id_customer' => object(FormField), 'id_gender' => object(FormField), 'firstname' => object(FormField), 'lastname' => object(FormField), 'email' => object(FormField), 'password' => object(FormField), 'birthday' => object(FormField), 'optin' => object(FormField), 'ps_emailsubscription_newsletter' => object(FormField)), 'genderField' => object(FormField), 'gender' => object(Gender), 'additionalCustomerFormFields' => array('ps_emailsubscription' => array(object(FormField)), 'an_staticblocks' => ''), 'additionnalFormFields' => '', 'moduleName' => 'an_staticblocks', 'formField' => object(FormField))) in CustomerFormatter.php line 215
  3. at CustomerFormatterCore->getFormat() in AbstractForm.php line 153
  4. at AbstractFormCore->fillWith(array('controller' => 'orderconfirmation', 'id_cart' => '30', 'id_module' => '58', 'id_order' => '22', 'key' => '13a4f870d4b8fb652eeee8234dc63ec5', 'check_url_warn' => 'yes', 'prod_info' => 'yes')) in OrderConfirmationController.php line 88
  5. at OrderConfirmationControllerCore->initContent() in Controller.php line 201
  6. at ControllerCore->run() in Dispatcher.php line 366
  7. at DispatcherCore->dispatch() in index.php line 28

 

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

this is not an 'error' but a 'warning'.  the php script continues to execute.  if you do not have feature issue, then you can disregard.

 

NOTE: disable PrestaShop debug mode!  you can pretty much ignore 'warnings' 'notices' unless there is fundamental issue with that area  of your shop.

 

also please post your PS versions as this makes it easier for community to search for bug related to your version.

Link to comment
Share on other sites

  • 9 months later...
On 22/2/2017 at 7:17 PM, cedschmidt said:

I got the following error when I try to order my cart. 

I use Prestashop 1.7 installed from scratch.

Please help me....

 

ContextErrorException in CustomerFormatter.php line 215:

Warning: Invalid argument supplied for foreach()

  1. in CustomerFormatter.php line 215
  2. at ErrorHandler->handleError('2', 'Invalid argument supplied for foreach()', '/home/aquamaew/www/boutique/classes/form/CustomerFormatter.php', '215', array('format' => array('id_customer' => object(FormField), 'id_gender' => object(FormField), 'firstname' => object(FormField), 'lastname' => object(FormField), 'email' => object(FormField), 'password' => object(FormField), 'birthday' => object(FormField), 'optin' => object(FormField), 'ps_emailsubscription_newsletter' => object(FormField)), 'genderField' => object(FormField), 'gender' => object(Gender), 'additionalCustomerFormFields' => array('ps_emailsubscription' => array(object(FormField)), 'an_staticblocks' => ''), 'additionnalFormFields' => '', 'moduleName' => 'an_staticblocks', 'formField' => object(FormField))) in CustomerFormatter.php line 215
  3. at CustomerFormatterCore->getFormat() in AbstractForm.php line 153
  4. at AbstractFormCore->fillWith(array('controller' => 'orderconfirmation', 'id_cart' => '30', 'id_module' => '58', 'id_order' => '22', 'key' => '13a4f870d4b8fb652eeee8234dc63ec5', 'check_url_warn' => 'yes', 'prod_info' => 'yes')) in OrderConfirmationController.php line 88
  5. at OrderConfirmationControllerCore->initContent() in Controller.php line 201
  6. at ControllerCore->run() in Dispatcher.php line 366
  7. at DispatcherCore->dispatch() in index.php line 28

 

 

Hi, did you finally solve this issue? we have exactly the same problem on our Prestashop (1.7.2.0).

Link to comment
Share on other sites

  • 2 years later...

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