- Issue created by @rrmontuan
- Status changed to Needs review
about 1 year ago 7:50pm 11 April 2023
When we add a term with more than 255 characters, the name is always truncated to 255 characters, even if the term name field is able to store more than 255 characters, either updating the DB schema or using a module like title_length, for example.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
This way, the term will be truncated to 255 characters even with the field name being able to store 500 characters.
We could use the service entity.last_installed_schema.repository to get the last installed storage definitions for taxonomy_term, using the method getLastInstalledFieldStorageDefinitions. This way, we will be able to retrieve the definitions for the field name and then, the setting max_length, containing the current value, equals 500.
Needs review
2.0
Code