VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: tomo11 on June 01, 2013, 19:55:45 PM

Title: Child Product alias too long when cloning - vmError when trying to save
Post by: tomo11 on June 01, 2013, 19:55:45 PM
Joomla 2.5.11
Virtuemart 2.0.20b

I made a parent product and added 64 children 95% i was cloning the child products, then renaming whenever necessary.
every time i clone the child product, the alias get incremented on the product... See attachment

When the name gets long (as seen in the attachment) after saving the file i get this error
"vmError: VmTable #__virtuemart_products_en_gb Check not passed. Neither slug nor obligatory value at product_name for auto slug creation is given
vmError: You are not an administrator or the correct vendor, storing of product cancelled"

The product DOES get saved, but i rename the alias to remove the error message.

Hope this is enough to explain what the potential problem might be.


[attachment cleanup by admin]
Title: Re: Child Product alias too long when cloning - vmError when trying to save
Post by: Milbo on June 03, 2013, 21:42:59 PM
The slug must be unique. If it is not unique we add a date, else a random number. So why do you not rename them a bit better fitting? Remember they are important for SEO. Set the size, the color, shape, whatever. For example nike-air-max-7-white-orange
Title: Re: Child Product alias too long when cloning - vmError when trying to save
Post by: tomo11 on June 10, 2013, 11:03:36 AM
I understand the point of the slug being unique, When a child product is cloned, the slug gets longer and longer, thus the vmError appears. When i edit the product and rename the slug as you suggest, then the vmError warning doesn't show up.

So bottom line, when cloned multiple times (child product in my case) the slug gets a long name, and you see the mentioned vmError.

Title: Re: Child Product alias too long when cloning - vmError when trying to save
Post by: Milbo on June 10, 2013, 13:43:47 PM
yes please try the latest 2.0.21 (D) http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: Child Product alias too long when cloning - vmError when trying to save
Post by: tomo11 on June 11, 2013, 12:07:27 PM
Thanks!

I will try on localhost as soon as i get a chance, but eventually simply adding a new child is faster than cloning and more convenient since after clicking add child, the child product page opens directly, plus most data is inherited, which is good...
Cloning also inherits parent images... not convenient when you want to have image only for the parent product.

Thank you again

I guess this can be marked as solved.  :)