Unused Fieldsets throw error

Created on 20 October 2020, about 4 years ago
Updated 1 November 2024, about 2 months ago

Problem/Motivation

After creating my required filters, this module produced a large amount of redundant fieldsets (see attached image). Unused fieldsets trigger an error for each unused filter.

Steps to reproduce

Create a view with a lot of exposed filters and then leave at least one fieldset unused. You will see this error:

Notice: Trying to access array offset on value of type null in Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi() (line 155 of modules/contrib/views_ef_fieldset/src/ViewsEFFieldsetData.php).
Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi(Array, Array, Array) (Line: 204)
Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi(Array, Array, Array) (Line: 204)
Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi(Array, Array, Array) (Line: 204)
Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi(Array, Array, Array) (Line: 204)
Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi(Array, Array, Array) (Line: 204)
Drupal\views_ef_fieldset\ViewsEFFieldsetData->recursivetreetofapi(Array, Array, Array) (Line: 90)
Drupal\views_ef_fieldset\ViewsEFFieldsetData->treetofapi() (Line: 24)
views_ef_fieldset_form_views_exposed_form_alter(Array, Object, 'views_exposed_form') (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'views_exposed_form') (Line: 837)
Drupal\Core\Form\FormBuilder->prepareForm('views_exposed_form', Array, Object) (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm('\Drupal\views\Form\ViewsExposedForm', Object) (Line: 134)
Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase->renderExposedForm() (Line: 1238)
Drupal\views\ViewExecutable->build() (Line: 390)
Drupal\views\Plugin\views\display\PathPluginBase->execute() (Line: 180)
Drupal\views\Plugin\views\display\Page->execute() (Line: 1630)
Drupal\views\ViewExecutable->executeDisplay('page_1', Array) (Line: 77)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
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: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->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: 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: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🐛 Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

🇦🇺Australia jaydee1818 Melbourne

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.

Production build 0.71.5 2024