Unable to use View field source in a component nested in a component with error message array_keys(): Argument #1 ($array) must be of type array, null given

Created on 12 February 2025, about 2 months ago

Problem/Motivation

In Views, I cannot use a "View field" source in a component that is nested inside another component.

I’m using Drupal 11.1.2.

Steps to reproduce

Create a new view working on a content type and use "Component (UI Patterns)" as row view style plugin and add some fields.

On the plugin options, use an SDC component with slots (here the "Magazine card" component which has "Card header", "Card content" and "Card footer" slots).

In one slot (here the "Card content" slot), insert another component (here the "Heading" component whis has "Content" slot)

Add a "view field" source to the slot (here the "title" field is added to the "Content" slot of the "Heading" component)

When applying the modifications, an error message stating "array_keys(): Argument #1 ($array) must be of type array, null given" appears right under the component selector.

πŸ› Bug report
Status

Active

Version

2.0

Component

UI Patterns Views

Created by

πŸ‡«πŸ‡·France zigazou

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