getEntityClass() must be of the type string, null returned

Created on 22 January 2022, over 2 years ago
Updated 3 December 2023, 7 months ago

Problem/Motivation

After update I randomly get this error, but did not create any bundle classes. One time it loads the entity, other time it does not load the same entity. I will update issue as I understand more why this is happening.

TypeError: Return value of Drupal\Core\Entity\EntityStorageBase::getEntityClass() must be of the type string, null returned in Drupal\Core\Entity\EntityStorageBase->getEntityClass() (line 115 of /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php)
#0 /web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(196): Drupal\Core\Entity\EntityStorageBase->getEntityClass()
#1 /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(508): Drupal\Core\Entity\ContentEntityStorageBase->getEntityClass()
#2 /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(427): Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords()
#3 /web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(393): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage()
#4 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(346): Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple()
#5 /web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(296): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
#6 ...: Drupal\Core\Entity\EntityStorageBase->load()

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.1 ✨

Component
EntityΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡±πŸ‡ΉLithuania mindaugasd

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024