Module blows up when non-ascii characters are entered

Created on 29 September 2024, about 2 months ago

Problem/Motivation

I tried saving a node with a title containing accented characters, and there was an error:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xC3\xA1m' for column `db`.`value_revisions`.`value_hash` at row 1: INSERT INTO "value_revisions" ("entity_type", "entity_id", "field_name", "delta", "source_revision_id", "value_hash") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 35168 [:db_insert_placeholder_2] => title [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 35168 [:db_insert_placeholder_5] => AdΓ‘m ) (/var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:817)

Steps to reproduce

  1. Configure a field to have its revisions tracked
  2. Try to save a value in that field containing a non-ascii character
  3. See error

Proposed resolution

Update the schema to allow non-ascii characters, using varchar instead.

Data model changes

See above...

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States MegaKeegMan

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

Comments & Activities

Production build 0.71.5 2024