Fields of type Translated Field can be created with max length larger than the supported max length of 255 characters.
For any field of type Translated Field, we store its translations in the helper table: sys_translated. Both the translation key field (sys_translated.value) and the translation field itself (sys_translated.label) are configured to have a max length of 255 characters.
However, there is nothing enforcing that other fields on other tables in the system be created with a matching maximum size. For example, as documented in PRB644004, the table 'content_page' has a field 'description' with max length 4000, even though it is of type Translated Field which does not support English value look-ups of that length.
The consequence is that if you have 2 values that are identical for the first 255 characters, but are different after that point in the English string, the sys_translated table can only hold 1 translation for both values (keyed by the first 255 common characters), resulting in incorrect translations half the time.
Steps to Reproduce
- Create a new table.
- Add a column type of Translated Field.
- Set the size to 500.
- Save the table.
You should not be able to make the Translated Field longer than 255 characters.
You can create a Translated Field element on a table with a length greater than 255 characters.
As a workaround, limit the text in Translated Field types to 255 characters. If you require more text, use Translated Text instead. Fix the data to conform to the 255 character limit instead of changing the column type, as that would wipe the translations for those fields.
Related Problem: PRB644005