#2563639: Global configuration via config entities added the function metatag_get_default_tags(), and modified MetatagFirehose::formElement to use the default tags in a foreach. The problem is that metatag_get_default_tags() can return null and the foreach doesn't check for a null value first, resulting in this warning anywhere a metatags field appears (such as a node edit form):

Warning: Invalid argument supplied for foreach() in Drupal\metatag\Plugin\Field\FieldWidget\MetatagFirehose->formElement() (line 71 of modules/contrib/metatag/src/Plugin/Field/FieldWidget/MetatagFirehose.php)

Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dane Powell created an issue. See original summary.

Dane Powell’s picture

Status: Needs review » Needs work

The last submitted patch, 2: metatag-2645338-2.patch, failed testing.

Dane Powell’s picture

Status: Needs work » Needs review

I'm not sure how this patch could possibly be responsible for the failing test.

DamienMcKenna’s picture

Status: Needs review » Fixed
Parent issue: » #2563607: Plan for Metatag 8.x-1.0-beta4 release

Committed. Thanks!

Status: Fixed » Closed (fixed)

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