The getSelectionHandler() may return error for the hierarchical select widget.

Created on 14 November 2025, 8 days ago

Problem/Motivation

Getting error in the field settings form when hierarchical_select widget is used:
Warning: Undefined array key "handler" in Drupal\custom_field\Plugin\CustomField\FieldType\EntityReference->getSelectionHandler() (line 337 of /var/www/html/web/modules/contrib/custom_field-3556431/src/Plugin/CustomField/FieldType/EntityReference.php)

Proposed resolution

Just fallback the handler on line 337 of EntityReference.php to: 'default:' . $target_type

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States apmsooner

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024