Problem/Motivation

When attempting to delete a reaction vote type that does not have an image I get this error.
If the type has an image there is no error.

The website encountered an unexpected error. Please try again later.
AssertionError: Cannot load the "file" entity with NULL ID. in assert() (line 295 of core\lib\Drupal\Core\Entity\EntityStorageBase.php).
assert(, 'Cannot load the "file" entity with NULL ID.') (Line: 295)
Drupal\Core\Entity\EntityStorageBase->load(NULL) (Line: 488)
Drupal\Core\Entity\EntityBase::load(NULL) (Line: 181)
votingapi_reaction_entity_delete(Object, 'vote_type')
call_user_func_array('votingapi_reaction_entity_delete', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_delete', Array) (Line: 339)
Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook('delete', Object) (Line: 500)
Drupal\Core\Entity\EntityStorageBase->delete(Array) (Line: 347)
Drupal\Core\Entity\EntityBase->delete() (Line: 122)
Drupal\Core\Entity\EntityDeleteForm->submitForm(Array, Object)

CommentFileSizeAuthor
#3 check_for_file-3261462-3.patch493 bytesloze

Comments

loze created an issue. See original summary.

loze’s picture

Issue summary: View changes
loze’s picture

Status: Active » Needs review
StatusFileSize
new493 bytes

Small patch that checks for a file id before attempting to load it.

  • elaman committed d709e28 on 8.x-1.x authored by loze
    Issue #3261462 by loze: AssertionError: Cannot load the "file" entity...
elaman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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