Jump to content
soterios

Invalid address #327 at line 444 in file classes/Address.php

Recommended Posts

[PrestaShopException]

Invalid address #327
at line 444 in file classes/Address.php

439.             // if an id_address has been specified retrieve the address
440.             if ($id_address) {
441.                 $address = new Address((int)$id_address);
442. 
443.                 if (!Validate::isLoadedObject($address)) {
444.                     throw new PrestaShopException('Invalid address #'.(int)$id_address);
445.                 }
446.             } elseif ($with_geoloc && isset($context->customer->geoloc_id_country)) {
447.                 $address             = new Address();
448.                 $address->id_country = (int)$context->customer->geoloc_id_country;
449.                 $address->id_state   = (int)$context->customer->id_state;

 

Iemand ook deze melding bij het openen van de winkelwagens?

Uw huidige PrestaShop versie : 1.7.3.1

Gr Bas

Share this post


Link to post
Share on other sites
On ‎4‎/‎17‎/‎2018 at 11:29 AM, soterios said:

[PrestaShopException]

Invalid address #327
at line 444 in file classes/Address.php


439.             // if an id_address has been specified retrieve the address
440.             if ($id_address) {
441.                 $address = new Address((int)$id_address);
442. 
443.                 if (!Validate::isLoadedObject($address)) {
444.                     throw new PrestaShopException('Invalid address #'.(int)$id_address);
445.                 }
446.             } elseif ($with_geoloc && isset($context->customer->geoloc_id_country)) {
447.                 $address             = new Address();
448.                 $address->id_country = (int)$context->customer->geoloc_id_country;
449.                 $address->id_state   = (int)$context->customer->id_state;

 

Iemand ook deze melding bij het openen van de winkelwagens?

Uw huidige PrestaShop versie : 1.7.3.1

Gr Bas

I've already looked for the solution in a more rude way ... I think that you have eliminated the customer test data that it brings when installing prestashop, and the system has lost the address or rather the data of the client, the only thing that should do is go to your database and look for an example: ps10n_cart, you select all the data and you delete, then you follow where it says: ps10n_cart_product and select the data that is in the tables and you delete ... I hope you have solved ...

Share this post


Link to post
Share on other sites
On 4/6/2018 at 2:21 PM, soterios dice:

I cleaned table in the database and it works ;-)

Which table?

Just found on forge==> truncate table ps_cart

Edited by centoasa
trovata soluzione (see edit history)

Share this post


Link to post
Share on other sites

I had the same problem, go to your database and open ps_cart table

 

search id_address_delivery = 327

(the invalid address number)

and delete the row

 

backup the database first!

 

 

  • Like 4

Share this post


Link to post
Share on other sites
On 7/19/2018 at 6:31 PM, mma87 said:

I had the same problem, go to your database and open ps_cart table

 

search id_address_delivery = 327

(the invalid address number)

and delete the row

 

backup the database first!

 

 


Hello, i just had the same issue and that fixed the problem. I had several entries so had to delete them all by looking for that exact number in search id_address_delivery column. I think the problem is appearing when user had added product to the basket and he had valid address in his/her profile. After that during checkout he decide to delete his address for some reason and did not finish the order. I was recently doing this before the problem appears and the user id is the same as my user. You can try to re-create it. I'm running Prestashop with default theme v.1.7.3, PHP 5.6.40, MySql 5.6.44

Thank you for your solution !

4.jpg

Share this post


Link to post
Share on other sites

hello,

yes this error can appears when the user delete his address.

I suggest you to upgrade your prestashop version to the last version and php version to php 7.2 or 7.3

 

Matteo

 

 

 

Share this post


Link to post
Share on other sites

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

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More