Problem With Address Table Record linking to Wrong

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #166889

-- HikaShop version -- : 2.3.1 business
-- Joomla version -- : 3.3.1
-- Browser(s) name and version -- : all

I have had 3 instances of customers logging on and finding that there billing_address is set up to be another customers name and address. I can see in the hikashop_address table that the original correct address record is set to not be published, the new address record is set up correctly for new customer, but there is another address record set up linking to wrong customer id. Do you have any idea why/how this would be happening?

I have attached a file showing the data of the latest instance. The customer_ids are consecutive and the address_ids are consecutive in this example.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #166894

Hi,

That can happen when you migrate your website for example from an old version of Joomla to a new one and that the id of the users change, or that you clean the users you had for your tests before going live but don't delete first their addresses or something like that.
Basically, it's not a bug, but data that has not been handled properly in the database. It cannot happen in the normal functioning of the shop.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #166943

Hi Nicholas

Thanks for your reply. I have migrated the website, but these records are all brand new records and did not exist previously. I have the backup of the old data and these records were not there. I do agree that it is weird and my first thought was that I had made an error in migrating data from virtuemart, but this has only happened 3 times, and it is a brand new user who registers (and the address never existed previously) .. there ends up being one address linked correctly to the new user, and the same address is created and linked wrongly to another existing user. Did you see the example that I sent? The IDs are all consecutive, and these were both brand new customers who registered one after the other - none of this data existed prior to last week. When two users are both registering at the same time, how does the system recognise which user is which? Does it do it with IP address? The one thing I am wondering about is that I am operating behind a sucuri.net firewall, so the IP address is the same for each user, and maybe the session id is the same? I am not really an expert in firewalls.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
10 years 3 months ago #166944

the other thing to note is that when the new record address is created twice, as well as linked wrongly to the previous user_id it also sets the published flag to "unpublished" .. does this help to isolate the code which does this?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #166947

Hi,

I don't know how that firewall work. I doubt that the user session is the same for everyone. That would render the shop unusable since everyone would have the same cart, the same login, etc.
I've neer seen such error happening besides the cases I pointed out.
Maybe the database structure is incorrect ? If some auto_increment is missing in some of the tables, it could potentially create strange problems like these.

Please Log in or Create an account to join the conversation.

Time to create page: 0.047 seconds
Powered by Kunena Forum