VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Peter Pillen on April 17, 2013, 14:36:20 PM

Title: When deleting product, price is removed from other product.
Post by: Peter Pillen on April 17, 2013, 14:36:20 PM
Joomla 2.5.9
Virtuemart 2.0.20b

When I delete a product in the backend (lets say product with id 316), the price of product with id 317 is deleted. Tested it many times and this bug is consistent.

It's the first time that I have deleted products since I upgraded to 2.0.20b two weeks ago. Can someone test this out? Because I don't recall changing anything that could cause this  ???
Title: Re: When deleting product, price is removed from other product.
Post by: franzpeter on April 17, 2013, 14:52:45 PM
Did try it out and in my case everything works fine while deleting products. The product with next or previous id are not changed and the price is still available.
Title: Re: When deleting product, price is removed from other product.
Post by: Peter Pillen on April 17, 2013, 14:55:34 PM
damm ... I must reïnstall then  :(
Title: Re: When deleting product, price is removed from other product.
Post by: Milbo on June 14, 2013, 15:34:26 PM
No, not reinstall. I cannot believe it, lets find the reason for it
Title: Re: When deleting product, price is removed from other product.
Post by: Peter Pillen on June 15, 2013, 12:18:39 PM
I was planning to reïnstall next week, but i can postpone it for a while. The problem still persists and I'm willing to look for the cause. But is there a VM speshitpillt that can guide me in the direction I need to search? I'm pretty good with php, mysql and virtuemart in general, but I don't always find the necessary files involved.

Now it deletes the price of a random product... I can't seem to find a connection between the product I delete and the price deleted by VM. With debug mode enabled, I also don't get any extra information on the delete action. It just shows me the same debug info as if I was navigating with the page numbers.
Title: Re: When deleting product, price is removed from other product.
Post by: Peter Pillen on June 17, 2013, 21:20:12 PM
I found the link in this bug.

When deleting a product with id 1279 for example... my virtuemart deletes the price with virtuemart_product_price_id 1279... without looking to the virtuemart_product_id

where can I find the code that handles this?
Title: Re: When deleting product, price is removed from other product.
Post by: Peter Pillen on June 17, 2013, 23:58:11 PM
Bug found and will be fixed in VM 2.0.20e

in the products.php the virtuemart_product_id was linked to the unique record id of the prices table.
Title: Re: When deleting product, price is removed from other product.
Post by: Milbo on June 18, 2013, 00:31:08 AM
It will be F, the other E is already out, ehrm, you got a version "in between"
Title: Re: When deleting product, price is removed from other product.
Post by: woop on August 26, 2013, 19:17:50 PM
Hi. I have the same problem.... random prices are deleted (I suppose that this happens when products are deleted as it´s said on this topic). Please as I do not find the "E" version, could you please let me know in witch script and wich line do I have to modify in order to solve this problem?
Title: Re: When deleting product, price is removed from other product.
Post by: AbsoluteVM on September 24, 2013, 18:39:14 PM
What an unhelpful reply. Have you ever come to a thread where some moron says he's fixed it and doesn't show how?

'jejejejeje' sets off your stupidity nicely.
Title: Re: When deleting product, price is removed from other product.
Post by: Milbo on September 24, 2013, 21:02:45 PM
Quote from: P2 Peter on June 17, 2013, 23:58:11 PM
Bug found and will be fixed in VM 2.0.20e
in the products.php the virtuemart_product_id was linked to the unique record id of the prices table.

First it is fixed since 2 months, second he describes how to fix it.