Undefined array key on file remove

Created on 14 February 2023, over 1 year ago
Updated 2 April 2024, 3 months ago

Problem/Motivation

I have a File-field that uses the default File-field widget. I am able to add a new file to the field correctly, but when I try to remove it on the node edit page, I receive the following error:

Warning: Undefined array key -2 in entity_browser/src/Plugin/Field/FieldWidget/EntityReferenceBrowserWidget.php on line 817

Proposed resolution

Add check that the array key exists.

🐛 Bug report
Status

RTBC

Version

2.0

Component

Field widget

Created by

🇫🇮Finland thatguy

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

Comments & Activities

Production build 0.69.0 2024