SQL type "varchar" for fieldtype "Select" could be too short for storing data
PKuhlmay opened this issue · 2 comments
PKuhlmay commented
Hi I have a fieldtype select, where I can select pages.
- identifier: references
type: Select
renderType: selectTree
size: 20
foreign_table: 'pages'
foreign_table_where: 'ORDER BY pages.uid'
treeConfig:
parentField: pid
appearance:
expandAll: true
showHeader: true
In the database this field is created with a varchar
:
In some cases this could lead into an error like this:
I checked a lot of pages inside the selectTree, untill it came to this error. There might be very few cases where it could come to this error but it could happen.
The field "pages" is stored with type "text" inside the database, maybe this could be the solution for type "Select" of CB.
nhovratov commented
This will be solved automatically with v13 as SQL columns will be generated based on TCA and the best fitting type will be chosen. For now, one must override the SQL in ext_tables.sql if varchar is not enough.
PKuhlmay commented
Okay I close this for now.