Fatal error VideoEmbedField not found

Created on 19 December 2022, over 2 years ago
Updated 11 May 2025, 29 days ago

Problem/Motivation

After upgrading to 2.5, I get a fatal error:

The website encountered an unexpected error. Please try again later.
Error: Class "Drupal\video_embed_field\Plugin\Field\FieldType\VideoEmbedField" not found in Drupal\field\FieldStorageConfigStorage->mapFromStorageRecords() (line 169 of core/modules/field/src/FieldStorageConfigStorage.php).

Drupal\field\FieldStorageConfigStorage->mapFromStorageRecords(Array) (Line: 182)
Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple(NULL) (Line: 346)
Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 191)
views_views_data() (Line: 236)
Drupal\views\ViewsData->Drupal\views\{closure}(Object, 'views') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('views_data', Object) (Line: 244)
Drupal\views\ViewsData->getData() (Line: 154)
Drupal\views\ViewsData->get('block_content') (Line: 94)
Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array) (Line: 101)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 291)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 181)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 146)
views_theme(Array, 'module', 'views', 'core/modules/views') (Line: 473)
Drupal\Core\Theme\Registry->processExtension(Array, 'views', 'module', 'views', 'core/modules/views') (Line: 360)
Drupal\Core\Theme\Registry->Drupal\Core\Theme\{closure}(Object, 'views') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('theme', Object) (Line: 361)
Drupal\Core\Theme\Registry->build() (Line: 259)
Drupal\Core\Theme\Registry->get() (Line: 88)
Drupal\Core\Utility\ThemeRegistry->initializeRegistry() (Line: 69)
Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:runtime:sienna', Object, Object, Array, 1) (Line: 279)
Drupal\Core\Theme\Registry->getRuntime() (Line: 142)
Drupal\Core\Theme\ThemeManager->render('console', Array) (Line: 433)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 243)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 707)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

There were no database updates and I rebuilt Drupal cache.
I rolled back and things are fine in the previous version.

🐛 Bug report
Status

Active

Version

2.5

Component

Code

Created by

🇺🇸United States shelane

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.

  • 🇮🇹Italy bigbabert Milano, Italy

    Hi all,

    not sure if it is related but if i try to save a filed with a JW Player Provider i get this error:

    Fatal error: Declaration of Drupal\video_embed_jwplayer\Plugin\video_embed_field\Provider\JwPlayer::renderEmbedCode($width, $height, $autoplay) must be compatible with Drupal\video_embed_field\ProviderPluginInterface::renderEmbedCode($width, $height, $autoplay, $title_format = null, $use_title_fallback = true) in /var/www/html/web/modules/contrib/video_embed_jwplayer/src/Plugin/video_embed_field/Provider/JwPlayer.php on line 27
    

    Best regads
    Alberto

  • 🇫🇷France mably

    Hi @bigbabert, it looks like Video Embed JW Player is not yet compatible with the 3.x Video Embed Version required for Drupal 11.

    The problem should be fixed on the Video Embed JW Player side.

    I can see that you already created two related issues there:

  • 🇮🇳India abhishek@kumar

    Confirm the class exists in the module
    modules/contrib/video_embed_field/src/Plugin/Field/FieldType/VideoEmbedField.php

    Ensure that file exists and contains the class:

    
    namespace Drupal\video_embed_field\Plugin\Field\FieldType;
    
    use Drupal\Core\Field\FieldItemBase;
    ...
    class VideoEmbedField extends FieldItemBase {
      ...
    }
    

    If it's missing, your update may have removed it unintentionally or the update didn't fully complete.

  • 🇫🇷France mably

    Please avoid useless AI generated comments here.

Production build 0.71.5 2024