Data too long for column 'name' error

Created on 24 March 2025, about 2 months ago

Overview

While installing alpha6 on 11.1, I received the error below:

% ddev drush en experience_builder

In ExceptionHandler.php line 56:

  SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO "key_value" ("name", "collection", "value")
   VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array
  (
      [:db_insert_placeholder_0] => field_block:block_content:basic:revision_translation_affected:block.field_block.block_content.basic.revision_transl
  ation_affected
      [:db_insert_placeholder_1] => experience_builder:component:reasons
      [:db_insert_placeholder_2] => a:1:{i:0;s:47:"Block plugin settings must be fully validatable";}
  )

I was able to push through by increasing the size of the VARCHAR from 128 to 255.

Proposed resolution

larowlan suggested that \Drupal\experience_builder\ComponentIncompatibilityReasonRepository::generateKey will need to hash if it is longer than 128 chars.

๐Ÿ› Bug report
Status

Active

Version

0.0

Component

Miscellaneous

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States aangel

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

Merge Requests

Comments & Activities

  • Issue created by @aangel
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia larowlan ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ.au GMT+10
  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia acbramley

    Posting my analysis from slack:

    The block name is a field block derivative of a block type provided by (possibly) standard profile. The experience_builder:component:reasons collection is definitely pointing to something XB is trying to save into key value

    Steps to reproduce should be around installing the standard profile + block_content module (to generate the field block deriviative) then enabling experience_builder?

  • First commit to issue fork.
  • Merge request !824Resolve #3514916 "Data too long" โ†’ (Open) created by Unnamed author
  • Pipeline finished with Failed
    about 2 months ago
    Total: 6199s
    #459017
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1859s
    #459228
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil isa.bel Balneรกrio Camboriรบ

    Please add steps to replicate the issue, because with a vanilla Drupal 11.1 and trying to install this module, no errors were thrown. See attached screenshot.

  • ๐Ÿ‡ง๐Ÿ‡ทBrazil brandonlira
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium wim leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

    Thanks, @brandonlira!

    Specifically, we need to know which database (SQLite, MariaDB โ€ฆ) and which version.

Production build 0.71.5 2024