- Issue created by @elgandoz
- Merge request !116Link trait: shorten the value.title if it exceeds 255 characters → (Open) created by elgandoz
While inserting a long link (>255 chars) and this is not found internally by Linkit, we get an error when the entity is saved:
Drupal\Core\Entity\EntityStorageException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_link_title' at row 1: INSERT INTO "pagedesigner_element__field_link" ("entity_id", "revision_id", "bundle", "delta", "langcode", "field_link_uri", "field_link_title", "field_link_options") VALUES ([...]) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (Zeile 817 in /project/app/public/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
As above.
Truncate the representative (form-only) title to 255, adding an ellipsis (…) if it's too long.
The title gets truncated with an ellipsis when it's too long.
Active
4.0
Code