Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
ColorboxFormatter doesn't implement the viewElements() method properly.
Fatal error: Declaration of Drupal\colorbox\Plugin\Field\FieldFormatter\ColorboxFormatter::viewElements() must be compatible with Drupal\Core\Field\FormatterInterface::viewElements(Drupal\Core\Field\FieldItemListInterface $items, $langcode)
This error was thrown, on the latest dev branch of D8 core after enabling this module from the 8.x-1.x branch.
Comment | File | Size | Author |
---|---|---|---|
#2 | colorbox-2585965-2.patch | 585 bytes | benelori |
|
Comments
Comment #2
benelori CreditAttribution: benelori commentedFormatterInterface::viewElements has the $langcode parameter in its definition as of 27/09/2015, so ColorboxFormatter needs to implement it as well.
Comment #3
benelori CreditAttribution: benelori commentedComment #5
frjo CreditAttribution: frjo commentedComment #6
frjo CreditAttribution: frjo commentedCommitted to 8-dev, thanks for finding and fixing this!