When adding a new field of type list (text), I've got this warning

Warning: Invalid argument supplied for foreach() in config_pages_form_field_storage_config_edit_form_alter() line 58

Because the storage config form has not the $form['settings']['target_type'].


Check if this element exists before iterating on it. Patch follows

#2 config_page_2875630-2.patch601 bytesflocondetoile
Members fund testing for the Drupal project. Drupal Association Learn more


flocondetoile created an issue. See original summary.

flocondetoile’s picture

Status: Active » Needs review
601 bytes
Grimreaper’s picture

Status: Needs review » Reviewed & tested by the community


Thanks @flocondetoile, it solved the warning.

bdanin’s picture

patch works for me as well

  • shumer committed a8db31d on 8.x-2.x authored by flocondetoile
    Issue #2875630 by flocondetoile: Warning: Invalid argument supplied for...
shumer’s picture

Thx for this patch, it will be included in next release.

shumer’s picture

Assigned: Unassigned » shumer
Status: Reviewed & tested by the community » Fixed
Grimreaper’s picture


@shumer, you commited non needed changes to the .info.yml file. Although the version number has been removed in another commit the following part can also be removed:

# Information added by Drupal.org packaging script on 2017-04-10
version: '8.x-2.x-dev'
core: '8.x'
project: 'config_pages'
datestamp: 1491830045

Status: Fixed » Closed (fixed)

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