Link title too long.

Created on 7 November 2024, 5 months ago

Problem/Motivation

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).

Steps to reproduce

As above.

Proposed resolution

Truncate the representative (form-only) title to 255, adding an ellipsis (…) if it's too long.

Remaining tasks

User interface changes

The title gets truncated with an ellipsis when it's too long.

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇦🇺Australia elgandoz Canberra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024