-2

After updating to drupal core 8.8.0 and php 7.2 Checkboxes are not rendering and throws below error. Checkboxes are not rendering on many forms which display list of checkboxes.

I updated to latest drupal version 8.8.4 still same warning I am getting and checkboxes are not rendering.

Error in retrieving lists. Warning: count(): Parameter must be an array or an object that implements Countable in Drupal\Core\Render\Element\Checkboxes::processCheckboxes() (line 58 of core/lib/Drupal/Core/Render/Element/Checkboxes.php). Drupal\Core\Render\Element\Checkboxes::processCheckboxes(Array, Object, Array) call_user_func_array(Array, Array) (Line: 999) Drupal\Core\Form\FormBuilder->doBuildForm('exact_target_newsletter_ajax_form', Array, Object) (Line: 1062) Drupal\Core\Form\FormBuilder->doBuildForm('exact_target_newsletter_ajax_form', Array, Object) (Line: 563) Drupal\Core\Form\FormBuilder->processForm('exact_target_newsletter_ajax_form', Array, Object) (Line: 320) Drupal\Core\Form\FormBuilder->buildForm('Drupal\exact_target\Form\NewsLetterAjaxForm', Object) (Line: 218) Drupal\Core\Form\FormBuilder->getForm('Drupal\exact_target\Form\NewsLetterAjaxForm') (Line: 30) getSubscriptionForm() (Line: 19) exact_target_preprocess_page(Array, 'page', Array) (Line: 287) Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 431) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200) Drupal\Core\Render\Renderer->render(Array) (Line: 501) Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 103) __TwigTemplate_4d0e70ebfbbb3174bc5f8489ec870a7b46da766d7ad6ab3338dcce8396067f59->doDisplay(Array, Array) (Line: 455) Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422) Twig\Template->display(Array) (Line: 434) Twig\Template->render(Array) (Line: 64) twig_render_template('themes/custom/bootstrap_tsnn/templates/html.html.twig', Array) (Line: 384) Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 431) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200) Drupal\Core\Render\Renderer->render(Array) (Line: 147) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent{closure}() (Line: 573) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148) 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: 191) Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128) Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50) Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 59) Drupal\httpbl\HttpblMiddleware->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: 694) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • 5
    I'm voting to close this question as off-topic because this is an issue in a custom module which needs debugging efforts first to locate the relevant code section. – 4k4 Mar 20 at 7:31

Browse other questions tagged or ask your own question.