Argument #1 ($array) must be of type array, null given in uasort() (line 74 of core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php)

Created on 22 August 2025, 1 day ago

Problem/Motivation

Getting
TypeError: uasort(): Argument #1 ($array) must be of type array, null given in uasort() (line 69 of core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php).

and this is happening when $base_plugin_id === 'inline_entity_form' @ core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php::getPluginId($target_type, $base_plugin_id)

Steps to reproduce

In Drupal 11.2 and custom block with layout builder to page and click save. Save not happening but error in logs

Proposed resolution

better fallback to default if $base_plugin_id not found and proper exception if fallback failed.

Remaining tasks

Figure out why inline_entity_form is getting into that code flow, maybe it should not at all.

User interface changes

none.

Introduced terminology

none.

API changes

none.

Data model changes

none.

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.2 πŸ”₯

Component

entity system

Created by

πŸ‡ΊπŸ‡¦Ukraine mykola dolynskyi Poltava

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

Comments & Activities

Production build 0.71.5 2024