Problem/Motivation

The website encountered an unexpected error. Try again later.

AssertionError: Cannot load the "image_style" entity with NULL ID. in assert() (line 261 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).
Drupal\Core\Entity\EntityStorageBase->load() (Line: 130)
Drupal\metatag_ui_enhancements\Service\MetatagUiEnhancementsService->getImageUrlWithStyle() (Line: 69)
metatag_ui_enhancements_tokens()
call_user_func_array() (Line: 416)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 415)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 364)
Drupal\Core\Utility\Token->generate() (Line: 241)
Drupal\Core\Utility\Token->doReplace() (Line: 191)
Drupal\Core\Utility\Token->replace() (Line: 66)
Drupal\metatag\MetatagToken->replace() (Line: 784)
Drupal\metatag\MetatagManager->processTagValue() (Line: 629)
Drupal\metatag\MetatagManager->generateRawElements() (Line: 61)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList::Drupal\metatag\Plugin\Field\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 48)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->computeValue() (Line: 32)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->ensureComputedValue() (Line: 114)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->isEmpty() (Line: 162)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate() (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate() (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 518)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 188)
Drupal\Core\Entity\ContentEntityForm->validateForm()
call_user_func_array() (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers() (Line: 274)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 593)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
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: 53)
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: 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: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

enable this module, see exiting node type with meta field now has media field.
attempt to select and save. this error is seen.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

skaught created an issue. See original summary.

selvira’s picture

Assigned: Unassigned » selvira
selvira’s picture

Hello,
I just tried with fresh install and I don't get the error, could you please tell me a bit more? like which version of Drupal are you using.
I tried with Drupal 11 fresh install.

Many thanks, best regards.

selvira’s picture

Assigned: selvira » Unassigned
Status: Active » Needs work
skaught’s picture

also was using drupal 11 (a new site, not an updated project). I had come across several other bug/error notices. this is the only one that was fatal/wsod.

selvira’s picture

Hi I attach a video, what I did:
1.- I check that the module is disabled.
2.- I created a new node.
3.- Check that there are no errors found.
4.- I enabled the module.
5.- I came back to the node previously created.
6.- I saved without image --> Expected results: Will be saved output: The node was saved and shown properly.
7.- I came back and added a new image.
8.- I clicked on save --> Expected results: Will be saved output: The node was saved and shown properly, furthermore the image was added in the "meta" tags inside the "head".

I am attaching a video here (https://streamable.com/4lmk1d), please do let me know If I am doing something wrong, thank you.
Best regards.

selvira’s picture

Version: » 1.0.0-alpha1
Status: Needs work » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.