\Drupal\schema_metatag\Plugin\metatag\Tag\SchemaHasPartBase::outputValue doesn't account for the case where the the $input_value is an array. \Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase::process_item returns an array when a Tag is configured to allow multiple values if there are in fact multiple comma separated values entered. hasPart is configured to allow multiple values. Before the attached patch, when a single value is entered in the UI for hasPart, things work fine, but after multiple values are entered, nothing gets output for hasPart since the code chokes on the array since it's expecting a string.
Please find the patch attached below.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | schema_metatag-multiple-has-part-2939668-2.patch | 681 bytes | shaundychko |
Comments
Comment #2
shaundychkoComment #4
karens commentedRight idea but the fix is different. I actually want to see an exception if that is not an array because it indicates the code passing this value is wrong. I also added a test for the multiple value for hasPart to be sure it is caught.
Thanks!