Illegal string offset '_original_delta'

Created on 10 August 2018, almost 6 years ago
Updated 3 March 2023, over 1 year ago

Problem/Motivation

In a node add form with a entity reference field (Inline Entity Form - Complex widget), after a click on "Add new taxonomy term", the AJAX request had this following warning in the response and the request was broken :

Warning: Illegal string offset '_original_delta' in /app/web/core/lib/Drupal/Core/Field/WidgetBase.php on line 372

In the extractFormValues from WidgetBase.php, the _original_delta is added without checking the $value type.

Proposed resolution

Add a type checking is_array on the $value before trying to add a key / value.

🐛 Bug report
Status

Needs work

Version

10.1

Component
Field 

Last updated about 24 hours ago

Created by

🇫🇷France xavier.masson Haute-Normandie

Live updates comments and jobs are added and updated live.
  • 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

Not all content is available!

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

Production build 0.69.0 2024