Data too long for column 'name' error

Created on 24 March 2025, 10 days 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
    6 days ago
    Total: 6199s
    #459017
  • Pipeline finished with Failed
    6 days ago
    Total: 1859s
    #459228
Production build 0.71.5 2024