diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 2d74efdb3..6cea6d378 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -11,6 +11,7 @@ - fixed #10893: Code editor uses element-min.js - fixed #10891: Asset manager JSON feed has macros processed - fixed #10900: Matrix: Product Listing template + - fixed #10902: Shelf asset is whiny 7.7.19 - fixed #10838: Forwarded forum post email to new CS adds reply to original thread diff --git a/lib/WebGUI/Asset/Wobject/Shelf.pm b/lib/WebGUI/Asset/Wobject/Shelf.pm index 545ad24cd..aead37d17 100644 --- a/lib/WebGUI/Asset/Wobject/Shelf.pm +++ b/lib/WebGUI/Asset/Wobject/Shelf.pm @@ -311,12 +311,11 @@ sub view { my @products = (); PRODUCT: foreach my $id (@productIds) { my $asset = WebGUI::Asset->newByDynamicClass($session, $id); - if (defined $asset && $asset->canView) { - push @products, $asset; - } - else { + if (!defined $asset) { $session->errorHandler->error(q|Couldn't instanciate SKU with assetId |.$id.q| on shelf with assetId |.$self->getId); - } + next PRODUCT; + } + push @products, $asset if $asset->canView; } # create paginator