News:

Support the VirtueMart project and become a member

Main Menu

Row size too large (after adding new table fields)

Started by OriyanJ, July 07, 2016, 08:07:58 AM

Previous topic - Next topic

OriyanJ

Well, I've noticed this error message is being addressed in this forum before, but still I can't seem to find an answer to my question.

I've added some fields to the database. The fields are product_included (TEXT), product_not_included (TEXT), product_additional_details (TEXT).
I've made them translatable, added them to the products module and to 2 tables - jos_virtuemart_products_en_gb and jos_virtuemart_products_ru_ru.
I'm using products for both English and Russian speakers.

When I save products with 2 languages, everything seems to work. But when I try to save store's configurations, I get -
Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs SQL=ALTER TABLE `jos_virtuemart_products_en_gb` CHANGE COLUMN `product_included` `product_included` CHAR(255) NOT NULL DEFAULT '' AFTER `customtitle`

What should I do? What's the cause of this?
VirtueMart 3.2.2

OriyanJ

It seems that if I change -
$fields['product_s_desc'] = 'varchar('.VmConfig::get('dbpsdescsize',2000).') '.$linedefault;
$fields['product_desc'] = 'varchar('.VmConfig::get('dbpdescsize',18400).') '.$linedefault;


to -
$fields['product_s_desc'] = 'text '.$linedefault;
$fields['product_desc'] = 'text '.$linedefault;


Problem will be solved, but do I really make the changes to the core VirtueMart files? can't I solve it on the database level?
I want minimum hacking and overriding when I have to update my VirtueMart.
VirtueMart 3.2.2

OriyanJ

Another solution is to add to virtuemart.cfg -
dblayoutstrict=0

But that alters all of the database and make each saving process longer.
Which keeps me asking, are those the only solutions? Hacking core files?
VirtueMart 3.2.2