On beta 16...
When adding a new Metatags field to a content type, the following error is thrown:
Fatal error: Declaration of Drupal\metatag\Plugin\Field\FieldFormatter\MetatagEmptyFormatter::viewElements() must be compatible with Drupal\Core\Field\FormatterInterface::viewElements(Drupal\Core\Field\FieldItemListInterface $items, $langcode) in /var/www/drupal/modules/contrib/metatag/src/Plugin/Field/FieldFormatter/MetatagEmptyFormatter.php on line 0
I am guessing this is because of an update to the most recent beta.
Steps to reproduce:
1. Structure > Content Types
2. Select "Manage Fields" of any content type
3. Add new field of type Metatags
4. Click "Save and continue"
Comments
Comment #2
paulmckibbenI ran into that same issue. Here's a patch!
Comment #3
damienmckennaThanks for reporting it. Yes, there were some API changes in beta16.
Comment #4
nerdsteinI was just about to submit the same patch as well. Cool!
Comment #5
damienmckennaThanks for the patch, paulmckibben! I'll try to review it shortly.
PS, don't forget to update the issue status to "needs review" when you add a patch!
Comment #11
damienmckennaThis is a duplicate of #2579865: Fatal error: Declaration of Drupal\metatag\Plugin\Field\FieldFormatter\MetatagEmptyFormatter::viewElements() must be compatible with Drupal\Core\Field\FormatterInterface::viewElements(Drupal\Core\Field\FieldItemListInterface $items, $langcode).