Feature request from sumihiro, posted on GitHub Aug 22, 2016
I want to use Text Swatch Attribute with long text.
But Default Store View value cannot be saved correctly. It will be shrink.
Preconditions
I'm using Magento2.1.0, and MySQL 5.6.30.
Steps to reproduce
- Create new Attribute, and select Text Swatch.
- Set long text to Default Store View in Manage Swatch.
Like: "01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
"
- Save Attribute.
Expected result
- Default Store View value is saved full length.
Actual result
- Value is shrink.
Like: "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234"
May be, it is caused by limitation of max varchar length (255) of MySQL.
mysql> desc eav_attribute_option_value;
+-----------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+----------------------+------+-----+---------+----------------+
| value_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| option_id | int(10) unsigned | NO | MUL | 0 | |
| store_id | smallint(5) unsigned | NO | MUL | 0 | |
| value | varchar(255) | YES | | NULL | |
+-----------+----------------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
How to save value correctly?