VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: SteP[IT] on July 30, 2013, 18:46:20 PM

Title: [Probably Solved] Bug very annoying in 'product -> product sons' editing
Post by: SteP[IT] on July 30, 2013, 18:46:20 PM
The problem in VM 2.0.22a arises when you add and then rename a son inside a parent product.

To reproduce the problem:

1) add a new product
2) set up a generic son variant
3) add this variant to the product
4) add a son
5) save

At this stage, you get a random value for the product son name, and you get also the SKU field filled with that name
Now:

1) change the SKU of the product son
2) save

After that operation, you get both the SKU and the NAME changed by the value you placed into the SKU field.

To get the right SKU displayed, right now you must edit the son by clicking the link on the left of the son's list, and add the SKU (that is empty inside the son)

Could you please fix it? ...we use a lot of son :)

Thank you in advance
Regards

EDIT: also, if you try to change the product son name by filling the appropriate field inside the son's list, it has no effect when saving: the name remains unchanged

SECOND EDIT (31-07): in addition to the problem described above, after adding a new son, a further son can't be added, I get this error:
vmError: Database error: createChild Duplicate entry 'ideal-remote6094' for key 'slug' SQL=INSERT INTO `j25_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("617","ideal-remote6094");
where 'deal-remote6094' is the name of the latest son previously added
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: SteP[IT] on August 01, 2013, 18:15:33 PM
Any chance to get this fixed soon?
Thank you in advance :)
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: agps on August 07, 2013, 12:30:06 PM
I have the same problem in a new installation :(
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: Milbo on August 08, 2013, 14:24:31 PM
i need someone of you in skype and then you must show me via screenshare, atm I was not able to reproduce
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: agps on August 08, 2013, 17:10:25 PM
Please check your pms.

The screen shot is after product save.

[attachment cleanup by admin]
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: Milbo on August 10, 2013, 13:23:51 PM
agps, you have a different problem, which is solved. Please look here http://forum.virtuemart.net/index.php?topic=114891.msg398711#msg398711
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: agps on August 10, 2013, 18:56:07 PM
Thanks but I have already uninstalled the 2.0.22a and I have installed 2.0.20b and everything works perfect!
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: Milbo on August 12, 2013, 12:14:48 PM
2.0.22a is definitly better. the error is also fixed.
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: agps on August 18, 2013, 12:21:44 PM
Could you please watch the following video?

http://vimeo.com/72582462

Why after save the child products alter their names?

[attachment cleanup by admin]
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: Milbo on August 23, 2013, 19:48:34 PM
Thanks to your video, I found it

just replace in file product_edit_information (BE view product) at line 383 the code

$attrib = 'product_name';
$childAttrib = $child->$attrib;


to

$childAttrib = $child->product_name;
Title: Re: Bug very annoying in 'product -> product sons' editing
Post by: agps on August 24, 2013, 13:08:50 PM
Thanks :)
Title: Re: [Probably Solved] Bug very annoying in 'product -> product sons' editing
Post by: SteP[IT] on August 30, 2013, 11:05:57 AM
Hi Milbo

Your solution seems not working for me (VM 2.0.22b).

So I have made this change to the line 379 of that file to get it working as expected:

Original Line:
if(isset($child->$attrib)){


Changed to:
if((isset($child->$attrib)) || ($attrib =='product_sku')){


Could you please confirm that it's a right modding?

Thank you in advance
Regards
Title: Re: [Probably Solved] Bug very annoying in 'product -> product sons' editing
Post by: Limonbay on November 17, 2013, 21:28:34 PM
Using the last mentioned solution I cannotsee the products in the backoffice.

The problem of getting an error when creating a child product remains. :-(
Title: Re: [Probably Solved] Bug very annoying in 'product -> product sons' editing
Post by: MarioP on January 03, 2014, 14:45:45 PM
I still have similar errors when I create children products. Has anybody encountered that strange behavior?
2013-12-27 14:19:42 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1688' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("241","pss-midi-stereo1688");
2013-12-27 22:08:34 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1688' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("242","pss-midi-stereo1688");
2013-12-27 22:09:23 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("243","pss-midi-stereo1685");
2013-12-27 22:10:19 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("247","pss-midi-stereo1685");
2013-12-27 22:11:57 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1688' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("248","pss-midi-stereo1688");
2013-12-27 22:13:53 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("250","pss-midi-stereo1685");
2013-12-27 22:15:35 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1682' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("253","pss-midi-stereo1682");
2013-12-27 22:15:53 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("254","pss-midi-stereo1685");
2013-12-27 22:16:48 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1684' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("256","pss-midi-stereo1684");
2013-12-27 22:17:02 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1684' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("257","pss-midi-stereo1684");
2013-12-27 22:17:16 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("258","pss-midi-stereo1685");
2013-12-27 22:17:49 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1688' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("260","pss-midi-stereo1688");
2013-12-27 22:18:01 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1682' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("261","pss-midi-stereo1682");
2013-12-27 22:27:28 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1684' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("266","pss-midi-stereo1684");
2013-12-27 22:37:24 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1681' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("267","pss-midi-stereo1681");
2013-12-27 22:40:24 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1679' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("272","pss-maxi-stereo1679");
2013-12-30 07:13:27 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1677' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("276","pss-maxi-stereo1677");
2013-12-30 07:15:00 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1678' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("279","pss-maxi-stereo1678");
2013-12-30 07:17:38 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1676' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("283","pss-maxi-stereo1676");
2013-12-30 07:21:01 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1678' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("286","pss-maxi-stereo1678");
2013-12-30 07:24:18 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1673' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("287","pss-maxi-stereo1673");
2013-12-30 07:25:02 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1678' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("288","pss-maxi-stereo1678");
2013-12-30 07:25:36 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1674' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("290","pss-maxi-stereo1674");
2013-12-30 07:28:33 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1675' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("295","pss-maxi-stereo1675");
2013-12-30 07:29:05 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1671' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("298","pss-maxi-stereo1671");
2014-01-02 09:23:31 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("299","pss-midi-stereo1685");
2014-01-02 11:52:52 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1685' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("302","pss-midi-stereo1685");
2014-01-02 12:25:05 ERROR vmError: Database error: createChild Duplicate entry 'pss-midi-stereo1681' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("303","pss-midi-stereo1681");
2014-01-02 13:38:05 ERROR vmError: Database error: createChild Duplicate entry 'pss-maxi-stereo1676' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("307","pss-maxi-stereo1676");
2014-01-02 14:05:29 ERROR vmError: Database error: createChild Duplicate entry 'pss-mini-stereo1693' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("315","pss-mini-stereo1693");
2014-01-02 14:07:42 ERROR vmError: Database error: createChild Duplicate entry 'pss-mini-stereo1695' for key 'slug' SQL=INSERT INTO `xxxx_virtuemart_products_en_gb` (`virtuemart_product_id`,`slug`) VALUES ("316","pss-mini-stereo1695");

I can't find the rule. It's enough to create more than 3 child product and the problem shows up. Despite the error the new child product is created. Is there everything ok? I have a multilanguage site.