Motivation

The following notice is thrown when I try to save an entity where some components (e.g. title) were removed from the field definition settings.

Notice: Undefined index: title in Drupal\name\Plugin\Field\FieldType\NameItem->filteredArray() (line 155 of modules/contrib/name/src/Plugin/Field/FieldType/NameItem.php).

Solution

Update conditional to check if the component is set in the field definition settings.

Comments

jkevingz created an issue. See original summary.

jkevingz’s picture

StatusFileSize
new595 bytes
jkevingz’s picture

Status: Active » Needs review
nkoporec’s picture

Updated the patch from #2, so that the original behavior stays the same.

  • nkoporec committed 4d8a086 on 8.x-1.x
    Issue #3094247 by jkevingz, nkoporec: Fix Notice Thrown When a Component...
nkoporec’s picture

Status: Needs review » Fixed

Merged, thanks for the initial patch!

Status: Fixed » Closed (fixed)

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