Jump to content

PrestaShopException Invalid address #241 after deleting abandoned shopping carts


Recommended Posts

v1.6.1.1

 

Please help...after deleting the abandoned shopping carts in my PrestaShop backoffice I now get the following exception every time I try to access the Customer Shopping Carts:

 

 

Invalid address #241
at line 401 in file classes/Address.php

396.             // if an id_address has been specified retrieve the address397.             if ($id_address) {398.                 $address = new Address((int)$id_address);399. 400.                 if (!Validate::isLoadedObject($address)) {401.                     throw new PrestaShopException('Invalid address #'.(int)$id_address);402.                 }403.             } elseif ($with_geoloc && isset($context->customer->geoloc_id_country)) {404.                 $address             = new Address();405.                 $address->id_country = (int)$context->customer->geoloc_id_country;406.                 $address->id_state   = (int)$context->customer->id_state;
Edited by Lone_Ranger (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Hi, check the database in cpanel, at "ps_address" table, column "id_address"  if there is entry with  #241, if is not add a new line with id_address value 241.

 

janbyte,

 

Thanks for that tip.  I finally had time to look into this and got it fixed by adding a 241 value to the id_address field as you stated...thanks for the help!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I had this same error on 1.6 from deleting addresses.  It left holes in the address database that I had to fill.  All I did was copy the address entry to each of the missing fields if it matched the name in the error and it worked again.  I did it through PHPmyadmin.  All better!  :)

Link to comment
Share on other sites

  • 1 month later...

Hi, check the database in cpanel, at "ps_address" table, column "id_address"  if there is entry with  #241, if is not add a new line with id_address value 241.

 

I was signed in as a customer and I couldn't see any product pages as a result of this issue, with error reporting turned product pages were showing the following

[PrestaShopException]

Invalid address #377

at line 362 in file classes/Address.php 

 

I then went ahead and applied your solution and it worked immediately! Thanks  :)  

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...