TypeError: FieldTypePluginManager::createFieldItem() called in FieldStorageConfig.php

Created on 27 May 2024, 3 months ago
Updated 6 September 2024, 1 day ago

Problem/Motivation

While creating a list field of a custom entity, we face a WSOD screen with this error in logs -

TypeError: Drupal\Core\Field\FieldTypePluginManager::createFieldItem(): Argument #1 ($items) must be of type Drupal\Core\Field\FieldItemListInterface, null given, called in /web/core/modules/field/src/Entity/FieldStorageConfig.php on line 710 in Drupal\Core\Field\FieldTypePluginManager->createFieldItem() (line 89 of /web/core/lib/Drupal/Core/Field/FieldTypePluginManager.php).

This issue is occurred on 10.2.* version, works with no issues with <= 10.1.

In 10.2 version, there is new update for FieldStorageConfig.php file for getOptionsProvider function.

Steps to reproduce

Create a custom entity, and try creating a select list field.
WSOD will be observed and above mentioned Error will be seen in Recent Logs.

Proposed resolution

Remaining tasks

Prerequisites/Blockers

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
Fieldย  โ†’

Last updated 1 day ago

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia lolmanKD

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024