When creating a Webform submission block view with an exposed filter an error is thrown:

Notice: Undefined index: #legend in Drupal\lightning_core\Element::processLegend() (line 135 of modules/contrib/lightning_core/src/Element.php).

The filter does work though.

Here is the full stack trace:

Drupal\lightning_core\Element::processLegend(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 997)
Drupal\Core\Form\FormBuilder->doBuildForm('views_exposed_form', Array, Object) (Line: 1060)
Drupal\Core\Form\FormBuilder->doBuildForm('views_exposed_form', Array, Object) (Line: 561)
Drupal\Core\Form\FormBuilder->processForm('views_exposed_form', Array, Object) (Line: 318)
Drupal\Core\Form\FormBuilder->buildForm('views_exposed_form', Object) (Line: 135)
Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase->renderExposedForm() (Line: 1238)
Drupal\views\ViewExecutable->build(NULL) (Line: 1391)
Drupal\views\ViewExecutable->execute(NULL) (Line: 1454)
Drupal\views\ViewExecutable->render() (Line: 130)
Drupal\views\Plugin\views\display\Block->execute() (Line: 1630)
Drupal\views\ViewExecutable->executeDisplay('block_1', Array) (Line: 77)
Drupal\views\Element\View::preRenderViewElement(Array) (Line: 59)
Drupal\views\Plugin\Block\ViewsBlock->build() (Line: 135)
Drupal\panels\Plugin\DisplayBuilder\StandardDisplayBuilder->buildRegions(Array, Array) (Line: 176)
Drupal\panels\Plugin\DisplayBuilder\StandardDisplayBuilder->build(Object) (Line: 219)
Drupal\panels_ipe\Plugin\DisplayBuilder\InPlaceEditorDisplayBuilder->build(Object) (Line: 331)
Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant->build() (Line: 396)
Drupal\panelizer\PanelizerEntityViewBuilder->buildPanelized(Object, Object, 'full', NULL) (Line: 356)
Drupal\panelizer\PanelizerEntityViewBuilder->buildMultiplePanelized(Array, Array, 'full', NULL) (Line: 274)
Drupal\panelizer\PanelizerEntityViewBuilder->view(Object, 'full') (Line: 97)
Drupal\Core\Entity\Controller\EntityViewController->view(Object, 'full', NULL) (Line: 55)
Drupal\node\Controller\NodeViewController->view(Object, 'full', NULL)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 51)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 669)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

criscom created an issue. See original summary.

kevin.pfeifer’s picture

StatusFileSize
new516 bytes

The if in src/Element.php line number 135 needs to have a !empty around the variable.

criscom’s picture

Status: Active » Needs review

Kevin's patch fixes the issue.

phenaproxima’s picture

Status: Needs review » Fixed

Committed and pushed to 8.x-3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.