Skip to content

Commit

Permalink
Merge pull request #1531 from openeuropa/release-4.2.1
Browse files Browse the repository at this point in the history
Release 4.2.1
  • Loading branch information
22Alexandra authored Nov 27, 2024
2 parents 3b77a26 + ef661a5 commit 2891284
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Changelog
# Change Log

## [4.2.0](https://github.com/openeuropa/oe_theme/tree/4.2.0) (2024-10-28)
## [4.2.1](https://github.com/openeuropa/oe_theme/tree/4.2.1) (2024-11-27)
[Full Changelog](https://github.com/openeuropa/oe_theme/compare/4.2.0...4.2.1)

**Merged pull requests:**

- EWPP-4969: Skip gallery items without available thumbnail. [\#1529](https://github.com/openeuropa/oe_theme/pull/1529) ([22Alexandra](https://github.com/22Alexandra))

## [4.2.0](https://github.com/openeuropa/oe_theme/tree/4.2.0) (2024-10-28)
[Full Changelog](https://github.com/openeuropa/oe_theme/compare/4.1.0...4.2.0)

**Merged pull requests:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Drupal\Core\Session\AccountInterface;
use Drupal\media\MediaInterface;
use Drupal\oe_theme\ValueObject\GalleryItemValueObject;
use Drupal\oe_theme\ValueObject\ImageValueObjectInterface;
use Drupal\oe_theme_helper\MediaDataExtractorPluginManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

Expand Down Expand Up @@ -224,6 +225,10 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
'thumbnail_image_style' => $this->getSetting('image_style'),
]);
$thumbnail = $extractor->getThumbnail($media);
// If the item does not have a thumbnail, skip it.
if (!$thumbnail instanceof ImageValueObjectInterface) {
continue;
}

$values = [
'thumbnail' => $thumbnail,
Expand Down

0 comments on commit 2891284

Please sign in to comment.