Getting database error while saving the configuration form on vmart admin end

Started by arpitr, October 08, 2012, 07:49:13 AM

Previous topic - Next topic

arpitr

Hi
I am using joomla 2.5 and virtuemart 2.0.6
I have created a added a custom column in the database table  #__virtuemart_products_en_gb to hold value for a checkbox.With the help of this checkbox I am allowing the parent product description to get inherit in child.But this checkbox is creating some warnings at virtuemart admin end.Here is a look for the warning I get whenever I save some settings in the shopfront tab inside configuration.
===============================================================================================

        alterTable CHANGE jlgom_virtuemart_products_en_gb.copy_parentdescription :Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs SQL=ALTER TABLE `jlgom_virtuemart_products_en_gb` CHANGE COLUMN `copy_parentdescription` `copy_parentdescription` VARCHAR(20000) NOT NULL DEFAULT ''
        Table updated: Tablename jlgom_virtuemart_products_en_gb dropped: 0 altered: 1 added: 0
        Configuration Saved

====================================================================================================
I have tried changing the datatype for the custom column to text,blob,enum('0','1') but none of them work.I'm not sure but it seems joomla runs some alter query on db while saving the form.
I'm stuck with this warning.Please help

Thanks
Arpit

arpitr

I got the solution for my problem.I was using the wrong database table to hold the custom field values in database.I changed my custom field from #_virtuemart_product_en-gb to #_virtuemart_product.The reason I guess was virtuemart uses setTranslatable function on columns of #_virtuemart_product_en_gb table ,which was altering the size for the fields in the table and making it larger then 65535.Now I have it in #_virtuemart_product table its working great! with no warning.