Trying to access array offset on value of type null in Drupal\blazy\Field\BlazyEntityVanillaBase->getAvailableBundles()

Created on 22 March 2023, over 1 year ago
Updated 15 May 2023, over 1 year ago

I get this warning:

Warning: Trying to access array offset on value of type null in Drupal\blazy\Field\BlazyEntityVanillaBase->getAvailableBundles() (line 99 of modules/contrib/blazy/src/Field/BlazyEntityVanillaBase.php).
Drupal\blazy\Field\BlazyEntityVanillaBase->getAvailableBundles() (Line: 159)
Drupal\blazy\Field\BlazyEntityVanillaBase->getPluginScopes() (Line: 169)
Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase->blazyCommonFieldDefinition() (Line: 59)
Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase->getCommonFieldDefinition() (Line: 129)
Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase->buildSettings() (Line: 43)
Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase->commonViewElements(Object, 'es', Array) (Line: 55)
Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase->viewElements(Object, 'es') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'es') (Line: 76)
Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFormatterBase->view(Object, NULL) (Line: 265)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 266)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 340)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'grid_2_col') (Line: 282)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 36)
Drupal\block_content\BlockContentViewBuilder->viewMultiple(Array, 'grid_2_col', NULL) (Line: 24)
Drupal\block_content\BlockContentViewBuilder->view(Object, 'grid_2_col') (Line: 218)
Drupal\layout_builder\Plugin\Block\InlineBlock->build() (Line: 106)
Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray->onBuildRender(Object, 'section_component.build.render_array', Object)
call_user_func(Array, Object, 'section_component.build.render_array', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'section_component.build.render_array') (Line: 90)
Drupal\layout_builder\SectionComponent->toRenderArray(Array, ) (Line: 88)
Drupal\layout_builder\Section->toRenderArray(Array) (Line: 316)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildSections(Object) (Line: 275)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 340)
Drupal\Core\Entity\EntityViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 24)
Drupal\node\NodeViewBuilder->buildComponents(Array, Array, Array, 'full') (Line: 282)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 239)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func(Array, Array) (Line: 221)
Drupal\w3_element_prohibitions\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: 68)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Maybe something it's not well defined in another place, but i make a patch to prevent this warning.

🐛 Bug report
Status

Fixed

Version

2.14

Component

Code

Created by

🇪🇸Spain Carlitus

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

Comments & Activities

Production build 0.71.5 2024