Problem/Motivation

When I try to add a pluginreference field, it results in the error below. The error appears right after adding the field name.

TypeError: uasort(): Argument #1 ($array) must be of type array, null given in uasort() (line 64 of modules/contrib/pluginreference/src/PluginReferenceSelectionManager.php).

This is on Drupal 10.3rc1 and PHP 8.3.

I have not been able to track down why (but haven't had much time to look into it either).

CommentFileSizeAuthor
#2 image.png19.04 KBarnested
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arnested created an issue. See original summary.

arnested’s picture

StatusFileSize
new19.04 KB

Field type selection

Oh. This only happens when I select the “Plugin reference” field type. If I select the “Filter” field type, it works.

What is the difference? I wasn't expecting to use a type named “Filter”. Reading the description made me try, though.

abhishek_gupta1’s picture

Assigned: Unassigned » abhishek_gupta1

abhishek_gupta1’s picture

Assigned: abhishek_gupta1 » Unassigned
Status: Active » Needs review

@arnested, I have fixed the issue, created MR, please review it once.

jeroent’s picture

Status: Needs review » Fixed

This was fixed with some Drupal 11 changes in #3433937: Automated Drupal 11 compatibility fixes for pluginreference

jeroent’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.