PHP: 7.1.1 / XAMPP
Core: 8.5.4
Ctools: 8.x-3.0
Module: Ctools-Views
Since Update to 8.x-3.0 I get the following warning when editing a views block type:
Warning: array_filter() expects parameter 1 to be array, null given in Drupal\ctools_views\Plugin\Display\Block->buildOptionsForm() (Zeile 55 in D:\xampp\htdocs\myproject\modules\ctools\modules\ctools_views\src\Plugin\Display\Block.php) #0 D:\xampp\htdocs\myproject\core\includes\bootstrap.inc(582): _drupal_error_handler_real(2, 'array_filter() ...', 'D:\\xampp\\htdocs...', 55, Array) #1 [internal function]: _drupal_error_handler(2, 'array_filter() ...', 'D:\\xampp\\htdocs...', 55, Array) #2 D:\xampp\htdocs\myproject\modules\ctools\modules\ctools_views\src\Plugin\Display\Block.php(55): array_filter(NULL) #3 D:\xampp\htdocs\myproject\core\modules\views_ui\src\Form\Ajax\Display.php(74): Drupal\ctools_views\Plugin\Display\Block->buildOptionsForm(Array, Object(Drupal\Core\Form\FormState)) #4 [internal function]: Drupal\views_ui\Form\Ajax\Display->buildForm(Array, Object(Drupal\Core\Form\FormState)) #5 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\Form\FormBuilder.php(518): call_user_func_array(Array, Array) #6 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\Form\FormBuilder.php(275): Drupal\Core\Form\FormBuilder->retrieveForm('views_ui_edit_d...', Object(Drupal\Core\Form\FormState)) #7 D:\xampp\htdocs\myproject\core\modules\views_ui\src\Form\Ajax\ViewsFormBase.php(214): Drupal\Core\Form\FormBuilder->buildForm('views_ui_edit_d...', Object(Drupal\Core\Form\FormState)) #8 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\Render\Renderer.php(582): Drupal\views_ui\Form\Ajax\ViewsFormBase->Drupal\views_ui\Form\Ajax\{closure}() #9 D:\xampp\htdocs\myproject\core\modules\views_ui\src\Form\Ajax\ViewsFormBase.php(216): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #10 D:\xampp\htdocs\myproject\core\modules\views_ui\src\Form\Ajax\ViewsFormBase.php(125): Drupal\views_ui\Form\Ajax\ViewsFormBase->ajaxFormWrapper('Drupal\\views_ui...', Object(Drupal\Core\Form\FormState)) #11 D:\xampp\htdocs\myproject\core\modules\views_ui\src\Form\Ajax\Display.php(46): Drupal\views_ui\Form\Ajax\ViewsFormBase->getForm(Object(Drupal\views_ui\ViewUI), 'block_1', 'ajax') #12 [internal function]: Drupal\views_ui\Form\Ajax\Display->getForm(Object(Drupal\views_ui\ViewUI), 'block_1', 'ajax', 'pager_options') #13 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #14 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\Render\Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #16 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #17 D:\xampp\htdocs\myproject\vendor\symfony\http-kernel\HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #18 D:\xampp\htdocs\myproject\vendor\symfony\http-kernel\HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #19 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 D:\xampp\htdocs\myproject\core\modules\page_cache\src\StackMiddleware\PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 D:\xampp\htdocs\myproject\core\modules\page_cache\src\StackMiddleware\PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 D:\xampp\htdocs\myproject\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 D:\xampp\htdocs\myproject\core\lib\Drupal\Core\DrupalKernel.php(666): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 D:\xampp\htdocs\myproject\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #28 {main}.
and:
Notice: Undefined index: #default_value in Drupal\ctools_views\Plugin\Display\Block->buildOptionsForm() (Zeile 55 in D:\xampp\htdocs\myproject\modules\ctools\modules\ctools_views\src\Plugin\Display\Block.php) #0 D:\xampp\htdocs\myproject\core\includes\bootstrap.inc(582): _drupal_error_handler_real(8, 'Undefined index...', 'D:\\xampp\\htdocs...', 55, Array) #1 D:\xampp\htdocs\myproject\modules\ctools\modules\ctools_views\src\Plugin\Display\Block.php(55): _drupal_error_handler(8, 'Undefined index...', 'D:\\xampp\\htdocs...', 55, Array) #2 ....
and:
Notice: Undefined index: allow in Drupal\ctools_views\Plugin\Display\Block->buildOptionsForm() (Zeile 46 in D:\xampp\htdocs\myproject\modules\ctools\modules\ctools_views\src\Plugin\Display\Block.php) #0 D:\xampp\htdocs\myproject\core\includes\bootstrap.inc(582): _drupal_error_handler_real(8, 'Undefined index...', 'D:\\xampp\\htdocs...', 46, Array) #1 D:\xampp\htdocs\myproject\modules\ctools\modules\ctools_views\src\Plugin\Display\Block.php(46): _drupal_error_handler(8, 'Undefined index...', 'D:\\xampp\\htdocs...', 46, Array) #2 ....
I uninstalled CTOOLS VIEWS and no further messages.
Comment | File | Size | Author |
---|---|---|---|
#5 | ctools-array_filter_warning-2978750-5.patch | 950 bytes | andrey.troeglazov |
| |||
#2 | Block.patch | 763 bytes | saurabh.dhariwal |
Comments
Comment #2
saurabh.dhariwal CreditAttribution: saurabh.dhariwal at AddWeb Solution Pvt. Ltd. commented@ksc, I review the issue you mentioned above, Please refer my patch which removes all the warnings & errors related to this module issue.
Please share your views if you still face the same issue.
Thanks!.
Comment #3
saurabh.dhariwal CreditAttribution: saurabh.dhariwal at AddWeb Solution Pvt. Ltd. commentedComment #4
ksc CreditAttribution: ksc as a volunteer commented@saurabh.dhariwal, thanks. It seems to be ok. No further notices or warnings.
Comment #5
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedMade it more readable and with short array.
Comment #7
joelpittetThanks @andrey.troeglazov and @saurabh.dhariwal, I've committed this to the dev branch