CacheableMetadata Null

Created on 13 September 2024, 2 months ago
Updated 18 September 2024, about 2 months ago

Problem/Motivation

The website encountered an unexpected error. Try again later.

TypeError: Drupal\Core\Cache\CacheableMetadata::createFromRenderArray(): Argument #1 ($build) must be of type array, null given, called in /var/www/html/docroot/modules/contrib/viewsreference/src/Plugin/Field/FieldFormatter/ViewsReferenceFieldFormatter.php on line 151 in Drupal\Core\Cache\CacheableMetadata::createFromRenderArray() (line 149 of core/lib/Drupal/Core/Cache/CacheableMetadata.php).

Steps to reproduce

On the page we choose the view. The view was removed and we have an error on the page. I think we need to add the condition if

!empty($render_array)

docroot/modules/contrib/viewsreference/src/Plugin/Field/FieldFormatter/ViewsReferenceFieldFormatter.php:117

$view->args is NULL and the $render_array is NULL

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine Foxy-vikvik

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024