Drupal\Core\Field\FieldException: Attempted to create an instance of field with name body on entity type block_content when the field storage does not exist. in Drupal\field\Entity\Fiel

Created on 30 March 2024, 9 months ago
Updated 10 September 2024, 4 months ago

I'm not sure where to post this so I appologies if this is the wrong space.

My site has been runing since 2006 (V6) and is currently stuck on 9.5.11 until I can upgrade my server (big task)

Lately I'm getting this error constantly ever few hours. I typiclly run an update.php to fix, even though that seems to do nothing.

Can any one please point me in the right dirstion as to how to solve this error? I am using cloudflare, memcache and purge modules if that helps.

HELP!

********************************************************

The website encountered an unexpected error. Please try again later.

Drupal\Core\Field\FieldException: Attempted to create an instance of field with name body on entity type block_content when the field storage does not exist. in Drupal\field\Entity\FieldConfig->getFieldStorageDefinition() (line 315 of core/modules/field/src/Entity/FieldConfig.php).
Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables(Array, ) (Line: 502)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords(Array) (Line: 427)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage(Array) (Line: 393)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple(Array) (Line: 346)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 296)
Drupal\Core\Entity\EntityStorageBase->load('33') (Line: 210)
Drupal\block_content\Plugin\Block\BlockContentBlock->getEntity() (Line: 176)
Drupal\block_content\Plugin\Block\BlockContentBlock->blockAccess(Object) (Line: 127)
Drupal\Core\Block\BlockBase->access(Object, 1) (Line: 124)
Drupal\block\BlockAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 105)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 314)
Drupal\Core\Entity\EntityBase->access('view', NULL, 1) (Line: 63)
Drupal\block\BlockRepository->getVisibleBlocksPerRegion(Array) (Line: 137)
Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 274)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 177)
Drupal\cloudflare\CloudFlareMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

๐Ÿ’ฌ Support request
Status

Closed: works as designed

Version

9.5

Component
Fieldย  โ†’

Last updated 1 day ago

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia Stephen Ollman Canberra

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

Comments & Activities

  • Issue created by @Stephen Ollman
  • Did you look around? Searching the internet for โ€œDrupal\Core\Field\FieldException: Attempted to create an instance of field with name body on entity type block_content when the field storage does not existโ€ gets some results.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States nicxvan

    Yes, searching on google the specific error is usually the first thing.
    When I search for your issue it comes up with this: https://drupal.stackexchange.com/questions/226515/attempt-to-create-a-fi...

    Most likely you created a field on a block entity and didn't commit the field storage config so it keeps trying to import it and failing.

    If you resolve that config issue that should clear up the issue.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone
  • Status changed to Closed: works as designed 4 months ago
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone

    It seems to me this has been answered.

    The Drupal Core issue queue is not the ideal place for support requests. The 'support request' option is there for filing support issues for contributed modules and themes. There are several support options listed on our support page โ†’ (Community > Support at the top of Drupal.org) and there is Drupal Slack โ†’ . You may get better replies in one of those places.
    Drupal 9.5 is not supported.

Production build 0.71.5 2024