Problem/Motivation

I am adding editor notes with drupal commerce product and when going to save I get the following error:

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'revision_id' cannot be null: INSERT INTO {editor_note} (bundle, uuid, uid, entity_id, entity_type, revision_id, note__value, note__format, field_machine_name, created, changed) 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, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); in Drupal\Core\Database\Connection->handleQueryException()

Comments

umangamu created an issue. See original summary.

umangamu’s picture

Issue summary: View changes
Rostislav Sergeenkov’s picture

Assigned: Unassigned » Andrei Haurukovich

  • Andrei Haurukovich committed 5d67b8b on Issue-3146516
    Issue #3146516: Integrity constraint violation 'revision_id' cannot be...
Andrei Haurukovich’s picture

I was able to reproduce this issue on User profile and comment page. Issue related to those entities that don't have value for revesion_id.

Andrei Haurukovich’s picture

Status: Active » Needs review

Rostislav Sergeenkov’s picture

Status: Needs review » Needs work

Hi Andrei.
I'm setting this issue back to work because in my opinion this fix isn't valid.
Revision ID must be an integer while your commit sets it to a blank string - https://git.drupalcode.org/project/editor_note/commit/287c968

Rostislav Sergeenkov’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.