The "" entity type does not exist

Created on 7 February 2024, 10 months ago
Updated 27 August 2024, 3 months ago

Problem/Motivation

I'm not sure when this began but I'm getting a big error when I go to certain pages which list Fields. For example, if I go to the main File List page in Drupal (/admin/reports/fields), or if I go to certain content types' (not all) fields lists, it shows an error page. I don't know how to troubleshoot this issue, but here's the error.

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::storageSettingsSummary() (Line: 144)
Drupal\Core\Field\FieldTypePluginManager->getStorageSettingsSummary() (Line: 141)
Drupal\field_ui\FieldStorageConfigListBuilder->buildRow() (Line: 242)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 88)
Drupal\field_ui\FieldStorageConfigListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

With my minimal ability to read these errors, it appears to be looking for an entity that doesn't exist. It seems like the database has an entry for an entity which is blank.

Steps to reproduce

I don't know if this happened when we upgraded to Drupal 10, or when I removed certain outdated modules. It's really hard for me to track when this began, so I have to take another approach to find the root cause. I have some patches in composer.json. I don't know how helpful it would be to show these, but here they are.

"patches": {
"drupal/core": {
"3347685-3: Access denied error on warning links from update module - invalid csrf_token" : " https://www.drupal.org/files/issues/2023-03-16/3347685-3.patch ",
"3392572: Deprecated function: strnatcasecmp(): Passing null to parameter #1 ($string1) of type string is deprecated in LayoutPluginManager" : " https://www.drupal.org/files/issues/2023-11-01/3392572-26.patch "
},
"drupal/accordion_menus": {
"3350925: Drupal 10 compatibility" : " https://www.drupal.org/files/issues/2023-03-29/drupal-10-compatibility-3... "
},
"drupal/migrate_directory" : {
"3288616: Automated Drupal 10 compatibility" : " https://www.drupal.org/files/issues/2022-06-16/migrate_directory.2.0.0.r... "
},
"drupal/bootstrap_barrio" : {
"3399061: Subtheme is not compatible with Drupal 10" : " https://www.drupal.org/files/issues/2023-11-06/3399061-2.patch "
},
"drupal/viewsreference" : {
"3273497: Passing null to parameter #1 ($data) of type string to unserialize() is deprecated" : " https://www.drupal.org/files/issues/2023-11-07/viewsreference-3273497-27... ",
"3400712: Enable extra settings only allows for saving of Pagination and Argument options" : "https://git.drupalcode.org/project/viewsreference/-/merge_requests/38.patch"
},
"drupal/xmlsitemap" : {
"3299530: Automated Drupal 10 compatibility fixes" : " https://www.drupal.org/files/issues/2023-09-27/xmlsitemap--drupal-10--32... "
},
"drupal/views_bootstrap" : {
"2948150: Views Bootstrap Tabs cannot be grouped" : " https://www.drupal.org/files/issues/2023-04-18/2948150-45.patch "
}
},

Please let me know if you have any ideas on where to start. I'm happy to query the database or maybe there's an Admin UI page that would be helpful. Any advice would be appreciated.

💬 Support request
Status

Closed: cannot reproduce

Version

11.0 🔥

Component
Entity 

Last updated about 10 hours ago

Created by

🇺🇸United States rraney

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.

  • Issue created by @rraney
  • 🇺🇸United States rraney
  • Status changed to Postponed: needs info 10 months ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Can you export the relevant FieldStorageConfig entity? 🙏

  • 🇺🇸United States rraney

    Thanks for the quick response. I don't know how to do this.

  • 🇺🇸United States rraney

    I have two clues, perhaps. There are two content types that I cannot access fields for. If I had to guess, this has to do with a field they both have in common. I have a suspicion now that it's the Smart Date module, which has been really problematic lately. I'll look into this.

  • The The "" entity type does not exist error has been asked before in this issue queue, although causes could differ.

  • 🇺🇸United States rraney

    I just don't really know where to begin. I'm looking through configuration export to see if there's a pattern in the two content types which I cannot access. Smart Date is actually not used on both, as far as I can tell.

  • 🇺🇸United States rraney

    In my case, I have two content types which I cannot access. I decided to compare them side by side in the configuration synchronizer. I also compared these to a Drupal 9 site that I have which is our legacy site. I discovered that the new site has a Dynamic Entity Reference field, but the old site does not. I updated this module, which had an update a week ago. Perhaps there was a conflict with 10.2 and this module. I'm almost certain it was this module causing this issue.

  • 🇬🇧United Kingdom globexplorer

    This means that you have still meta data for entity in your config but the code has gone.

  • Status changed to Closed: cannot reproduce 3 months ago
  • 🇺🇸United States rraney
Production build 0.71.5 2024