[Skip to main content](#vessel-content)

#   Extra unrelated addresses for customers in Hikashop

##

- **[triotech](/forum/user/25968-triotech "View triotech's Profile")**
- [![triotech's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/25968-triotech "View triotech's Profile") Topic Author
- [ Offline](/forum/user/25968-triotech)

Less More

- Posts: 71
- Thank you received: 0
-
-

6 years 9 months ago [\#315142](#315142) by [triotech](/forum/user/25968-triotech "View triotech's Profile")  *[Extra unrelated addresses for customers in Hikashop](/forum/33-customers/899082-extra-unrelated-addresses-for-customers-in-hikashop#315142 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25  HI, several customers have reported that there are additional Shipping and Billing addresses in their profile that are completely unrelated to them. I have attached a screenshot below Many customers have these rogue addresses on them. This appeared to occur several days ago and whilst we could get rid of them, will they return? I don't know where they have come from and a DB search shows that the extra addresses are only related to one user ID")* was created by *[triotech](/forum/user/25968-triotech "View triotech's Profile")*

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.25

HI, several customers have reported that there are additional Shipping and Billing addresses in their profile that are completely unrelated to them. I have attached a screenshot below  [ ![heat.png](/forum/attachment/48620) ](/forum/attachment/48620 "heat.png")

Many customers have these rogue addresses on them. This appeared to occur several days ago and whilst we could get rid of them, will they return? I don't know where they have come from and a DB search shows that the extra addresses are only related to one user ID

- [ ![heat.png](/forum/attachment/48620) ](/forum/attachment/48620 "heat.png") [ ](/forum/attachment/48620?download=1 "heat.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTkwODItZXh0cmEtdW5yZWxhdGVkLWFkZHJlc3Nlcy1mb3ItY3VzdG9tZXJzLWluLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

6 years 9 months ago [\#315145](#315145) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Extra unrelated addresses for customers in Hikashop](/forum/33-customers/899082-extra-unrelated-addresses-for-customers-in-hikashop#315145 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25  HI, several customers have reported that there are additional Shipping and Billing addresses in their profile that are completely unrelated to them. I have attached a screenshot below Many customers have these rogue addresses on them. This appeared to occur several days ago and whilst we could get rid of them, will they return? I don't know where they have come from and a DB search shows that the extra addresses are only related to one user ID")*

Hi,

Do you mean that every one is seeing the same ones ? Or different ones ?
Supposing that it's different ones, I suppose that either you've deleted users from the hikashop_user table at some point without removing the addresses in hikashop_address and thus the address there were pointing at an unexisting user entry.
Then, when someone creates a new account which gets affected to the same user id as one that was deleted before (it shouldn't happen unless the auto_increment of the hikashop_user table is reset, or you do a website migration of some kind), the user automatically sees these old addresses that have the same user id than his entry in hikashop_user.
Note that this could also happen with a migration from another ecommerce solution where the addresses / users were not migrated properly. Again, it means that the issue won't happen anymore in the future after you delete the unaffected addresses.
So this means that if you delete these unaffected address entries, it won't happen again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTkwODItZXh0cmEtdW5yZWxhdGVkLWFkZHJlc3Nlcy1mb3ItY3VzdG9tZXJzLWluLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[triotech](/forum/user/25968-triotech "View triotech's Profile")**
- [![triotech's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/25968-triotech "View triotech's Profile") Topic Author
- [ Offline](/forum/user/25968-triotech)

Less More

- Posts: 71
- Thank you received: 0
-
-

6 years 9 months ago [\#315180](#315180) by [triotech](/forum/user/25968-triotech "View triotech's Profile")  Replied by *[triotech](/forum/user/25968-triotech "View triotech's Profile")* on topic *[Extra unrelated addresses for customers in Hikashop](/forum/33-customers/899082-extra-unrelated-addresses-for-customers-in-hikashop#315180 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25  HI, several customers have reported that there are additional Shipping and Billing addresses in their profile that are completely unrelated to them. I have attached a screenshot below Many customers have these rogue addresses on them. This appeared to occur several days ago and whilst we could get rid of them, will they return? I don't know where they have come from and a DB search shows that the extra addresses are only related to one user ID")*

Each customer has different addresses as you guessed. This site has been up for several years now and was maybe was migrated when new, but I think the Hikashop install was newly developed and not imported from another component

I have never deleted addresses from the DB directly, about the only thing I could have done was delete Joomla Users who were "never logged in" from the User table but using the Joomla back-end to delete. Would this have caused the address missmatch?

If I delete the second addresses, how do I know that the next new user won't get an existing unattached address?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTkwODItZXh0cmEtdW5yZWxhdGVkLWFkZHJlc3Nlcy1mb3ItY3VzdG9tZXJzLWluLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

6 years 9 months ago [\#315183](#315183) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Extra unrelated addresses for customers in Hikashop](/forum/33-customers/899082-extra-unrelated-addresses-for-customers-in-hikashop#315183 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.25  HI, several customers have reported that there are additional Shipping and Billing addresses in their profile that are completely unrelated to them. I have attached a screenshot below Many customers have these rogue addresses on them. This appeared to occur several days ago and whilst we could get rid of them, will they return? I don't know where they have come from and a DB search shows that the extra addresses are only related to one user ID")*

Hi,

Normally, even if you delete users and don't delete addresses, the issue should not happen. That's because there is an auto increment value on the user id and thus it should only go up for new customers. So for example, if you have 2000 users and never deleted one, the next ID attributed to a new user should be 2002. If you delete the user with the id 1000 but not its addresses, then you have ghost addresses linked to a user entry with the id 1000 which doesn't exist anymore. But future users would still have their IDs above 2001 so new users should never ever see these ghost addresses.

Also, what you should do is delete from the hikashop_address table all the entries linked to an entry in hikashop_user which doesn't exist.
You can do that with such MySQL query in your PHPMyAdmin: Code:

DELETE FROM #__hikashop_address as A WHERE A.address_user_id NOT IN (SELECT U.user_id FROM #__hikashop_user AS U);

where #__ is to be replaced by your table prefix.
That way, you'll be sure the next new users won't get existing ghost addresses attached to them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84OTkwODItZXh0cmEtdW5yZWxhdGVkLWFkZHJlc3Nlcy1mb3ItY3VzdG9tZXJzLWluLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.047 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
