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.

CommentFileSizeAuthor
#2 colorbox-2585965-2.patch585 bytesbenelori
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

benelori created an issue. See original summary.

benelori’s picture

Status: Active » Needs review
FileSize
585 bytes

FormatterInterface::viewElements has the $langcode parameter in its definition as of 27/09/2015, so ColorboxFormatter needs to implement it as well.

benelori’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 2: colorbox-2585965-2.patch, failed testing.

frjo’s picture

Title: Fatal Error after enable » Missing $langcode parameter in ColorboxFormatter::viewElements()
frjo’s picture

Status: Needs work » Fixed

Committed to 8-dev, thanks for finding and fixing this!

  • frjo committed 9740e08 on 8.x-1.x authored by benelori
    Issue #2585965 by benelori: Missing $langcode parameter in...

Status: Fixed » Closed (fixed)

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