There might be cases where you are not able to add Data Fields on WebNative, and you will receive the error message "There was an error with the keyword data table" as shown below:
You will also find an error similar to the following one on the logs:
db_mysqlxquery: Query Error!
[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],
err 1118, depth 0, cid 20701519, pid 28920, time 0
BAD[ALTER TABLE keyword1 ADD Field426 varchar(64)]
db_mysqlxquery: Query Error! [Can't DROP 'Field426'; check that column/key exists], err 1091, depth 0, cid 20701519, pid 28920, time 0
BAD[ALTER TABLE keyword1 DROP Field426]
keyword_delete: Failed to drop Field426 from keyword1 table
As stated in the error message, the maximum size for a row is 65535 bytes; most probably you are nearing that limit and MySQL does not allow you to add more fields as that would exceed the maximum value.
As a workaround, you can increase the size of the small Text fields (with 64 bytes maximum length) to a higher value to be at least 256 bytes. Indeed, this step is counterintuitive. You can check the MySQL article on Table Column Count and Row Size Limits for more information.
Follow the next steps below as a workaround.
- Identify the fields that can be converted to Text type.
You can use the following query:
SELECT keywordId, name, description, type, size, cols, rows FROM keyword
WHERE type=253 AND size=64;
- Increase the size of the fields, you identified in the previous step. You can do this from the WebNative interface:
- Navigate to DATABASE > Data Fields > summary.
- Find the field(s) on the table and click on the pencil button.
- Increase the size to at least
256in the Maximum Length field and click on the Save button.
Try again to add the field you originally wanted to add from the WebNative, this time it should allow adding the field. If you see the error appearing again, then most probably you still need to increase the size of some additional Text fields.