processwire-issues
processwire-issues copied to clipboard
Prevent long field names that clash with MySQL maximum length of table names?
MySQL has a limit of 64 characters for table names.
Not sure if this is necessarily a bug, but something I experienced that I think ProcessWire should handle.
If I make a new field with this name it's valid:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
But if rename that field and add one more x, like this:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
... then I get the following error when saving the field because it's over 64 characters:
ProcessField: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name 'tmp_field_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'