Column 'vid' cannot be null INSERT INTO "entity_legal_document_acceptance"

Created on 27 July 2023, over 1 year ago
Updated 11 September 2024, 7 months ago

Problem/Motivation

After update i get this error

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'vid' cannot be null: INSERT INTO "entity_legal_document_acceptance" ("uid", "acceptance_date", "data", "vid") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 86855 [:db_insert_placeholder_1] => 1690458784 [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (linea 50 di /var/www/html/web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php).

vid exists in entity_legal_document_version and entity_legal_document_version_data table.
thank you

🐛 Bug report
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

🇮🇹Italy trickfun

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

Comments & Activities

  • Issue created by @trickfun
  • 🇮🇹Italy trickfun

    i have other informations.
    When i run drush updb i get this error

    [error]  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'base_table.vid' in 'field list': SELECT "base_table"."vid" AS "vid", "base_table"."vid" AS "base_table_vid"
    > FROM
    > "entity_legal_document_version" "base_table"
    > INNER JOIN "entity_legal_document_version_data" "entity_legal_document_version_data" ON "entity_legal_document_version_data"."vid" = "base_table"."vid"
    > WHERE ("entity_legal_document_version_data"."document_name" = :db_condition_placeholder_0) AND ("entity_legal_document_version_data"."published" = :db_condition_placeholder_1); Array
    > (
    >     [:db_condition_placeholder_0] => privacy_document
    >     [:db_condition_placeholder_1] => 1
    

    i hope this can help
    thank you

  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Seems to be some inconsistencies in the initial database

  • 🇮🇹Italy trickfun

    I need to reinstall module to fix error.
    Update from 3 to 4 version brokes something.

  • Status changed to Closed: won't fix 7 months ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    We could not guarantee that upgrade because of the complexity of change. See also 🐛 Cannot update. Getting Mysql error Active .

    Closing this as it seems you've fixed your project.

Production build 0.71.5 2024