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

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

elgandoz created an issue. See original summary.

elgandoz’s picture

guillaumepacilly made their first commit to this issue’s fork.

guillaumepacilly’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.