I've just got a standard drupal 8.37 install with the deploy module enabled (1.x-beta2 and all of it's friends)

When i try to deploy an Article node with an image attached to it, nothing is deployed and i see the following in the logs:

Location: http://master.localhost/relaxed/live/_bulk_docs
Message:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uri' cannot be null: INSERT INTO @file_managed (revision_id, uuid, langcode, uid, filename, uri, filemime, filesize, status, created, changed, workspace, _deleted, _rev) 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, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13); Array ( [:db_insert_placeholder_0] => [:db_insert_placeholder_1] => b80ad170-9cd3-4498-a8b5-0f16fcb63560 [:db_insert_placeholder_2] => en [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 806155326 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 1 [:db_insert_placeholder_9] => 1506144170 [:db_insert_placeholder_10] => 1506144170 [:db_insert_placeholder_11] => 1 [:db_insert_placeholder_12] => 0 [:db_insert_placeholder_13] => 0-00000000000000000000000000000000 )
CommentFileSizeAuthor
#2 2911178-2.patch4.88 KBjeqq

Comments

thtas created an issue. See original summary.

jeqq’s picture

Status: Active » Needs review
StatusFileSize
new4.88 KB

This error happens because the stub file entity fails to be saved when the uri is not specified. Some background: during replication, when for a entity reference field the target entity doesn't exist on the target workspace, on denormalization we create a stub entity with the minimal information about that entity, later when the full entity is coming, the stub entity is updated with all the entity values.

For file entity this still can't be perfect, because the file entity will be created as stub, it will be attached to the field, but the file will be missing in the directories until the file entity is not replicated.

  • jeqq committed 529acf2 on 8.x-1.x
    Issue #2911178 by jeqq: Node with a file won't sync: Integrity...
jeqq’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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