opigno_answer__field_correct_response is short in some cases

Created on 15 November 2023, about 1 year ago

Problem/Motivation

When the correct answer is too long, the database save fail:

Drupal\Core\Entity\EntityStorageException: SQLSTATE[22001]: String data, right truncated: 7 ERROR: value too long for type character varying(255): INSERT INTO "opigno_answer__field_correct_response" ("entity_id", "revision_id", "bundle", "delta", "langcode", "field_correct_response_value") 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 ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Steps to reproduce

Save a long serie of correct responses with long strings.

Proposed resolution

increase the field capacity

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

🇧🇴Bolivia vacho Cochabamba

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

Comments & Activities

Production build 0.71.5 2024