Problem/Motivation
Some plugins don't have a description, as example, OgCountryName of metatag_open_graph submodule. When you visit a metatag plugins report page it generates warnings in logs when a site uses php8
Warning: Undefined array key "description" in Drupal\metatag\Controller\MetatagController->reportPlugins() (line 120 of
Steps to reproduce
Use php8, install a metatag_open_graph submodule and visit plugins report page /reports/metatag-plugins
Proposed resolution
Add a description key checking in MetatagController on line 120.
$row['description'] = [
'data' => [
'#markup' => isset($definition['description']) ? $definition['description'] : '',
],
'colspan' => 8,
];
And/or add a proper description to all annotations of meta tag plugins.
Comments
Comment #2
damienmckennaDoes this fix the problem?
Comment #3
pcate commentedI found this error on the /reports/metatag-plugins page today as well. Patch applies cleanly and removes error.
Comment #4
damienmckennaComment #6
damienmckennaCommitted. Thank you.