TypeError: Argument 1 passed to Drupal\Core\Render\BubbleableMetadata::createFromRenderArray() must be of the type array, null given

Created on 17 June 2020, almost 5 years ago
Updated 27 April 2023, almost 2 years ago

Problem/Motivation
After installing the views_infinite_scroll β†’ module and enabling it on same views that have exposed filters infinite scroll doesn't work. I get the error:
TypeError: Argument 1 passed to Drupal\Core\Render\BubbleableMetadata::createFromRenderArray() must be of the type array, null given, called in /var/www/html/core/modules/views/src/Controller/ViewAjaxController.php on line 199 in Drupal\Core\Render\BubbleableMetadata::createFromRenderArray() (line 65 of /var/www/html/core/lib/Drupal/Core/Render/BubbleableMetadata.php).

Probably this issue can be reproduced without group or search API modules, but in my case, I get the error on the search views that based on search API and views that based on group content with exposed filters. And I think it can be reproduced in some cases when you will have just view with exposed filters.
This issue is not related to issues with BEF.

How to reproduce

  • Install the views_infinite_scroll β†’ and group β†’ modules
  • Enable these modules
  • Create a view based on one of provided entities (search API or group content) and add some exposed filters, also try to create view based on some default entity (E.G. basic page) and this entity should be related to group then create a view based on this basic page entity and add group to relations.
  • Use "infinite scroll" instead of default pager
  • Go to some of these views (E.G. group page with list of related entities - basic page in our case)
  • Try to click "load more" and you should get an error in browser console

Proposed resolution
Add an extra condition when a view has exposed filters and override arguments

πŸ› Bug report
Status

Closed: duplicate

Version

9.4

Component
AjaxΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡¦Ukraine rolki

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.

  • πŸ‡ΊπŸ‡ΈUnited States w01f

    Hit this on a new D10 site - had to remove user timezones for the combine fields filter to work correctly. Strangely I can't seem to find permissions settings for the timezone field to enable this for viewing by non-admin users.

Production build 0.71.5 2024