Description
In the current project, we are heavily using matrix field which contains a number of block type having a decent number of fields of different kinds. Lately, by adding new block types and fields, mysql started to throw an error (with around ~200 in the table):
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1118 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 in /app/vendor/yiisoft/yii2/db/Command.php:842
It doesn't look like edge case with matrix fields and actually, some other Craft users might face the same issue.
I found some existing posts in stack exchange and stack overflow about kinda similar problem but suggested solution there (make changes in mysql server configuration or table engine) is impossible to implement due to different impediments with infrastructure and other things.
We discussed this issue with colleagues and suggested as an option to create a custom field type, based on matrix field, which will rely on multiple separated tables instead of multiple numbers of fields in a single table (like fields collections in Drupal).
Can you suggest any ideas how to solve this issue? What do you think about the new field type idea? In case we will implement new field type, can it be included into Craft core?
Steps to reproduce
- Create entry matrix field.
- Add a lot of block type (~20) with different types of fields (~10-15 per block type).
Additional info
- Craft version: 3.0.0-beta.28 and older
- PHP version: 7.1
- Database driver & version: Mysql
Description
In the current project, we are heavily using matrix field which contains a number of block type having a decent number of fields of different kinds. Lately, by adding new block types and fields, mysql started to throw an error (with around ~200 in the table):
It doesn't look like edge case with matrix fields and actually, some other Craft users might face the same issue.
I found some existing posts in stack exchange and stack overflow about kinda similar problem but suggested solution there (make changes in mysql server configuration or table engine) is impossible to implement due to different impediments with infrastructure and other things.
We discussed this issue with colleagues and suggested as an option to create a custom field type, based on matrix field, which will rely on multiple separated tables instead of multiple numbers of fields in a single table (like fields collections in Drupal).
Can you suggest any ideas how to solve this issue? What do you think about the new field type idea? In case we will implement new field type, can it be included into Craft core?
Steps to reproduce
Additional info