diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm
index 4248992f3..da641c354 100644
--- a/lib/WebGUI/Asset/Wobject/Matrix.pm
+++ b/lib/WebGUI/Asset/Wobject/Matrix.pm
@@ -455,10 +455,12 @@ sub view {
limit => 1,
returnObjects => 1,
}) };
- $var->{bestViews_url} = $bestViews_listing->getUrl;
- $var->{bestViews_count} = $bestViews_listing->get('views');
- $var->{bestViews_name} = $bestViews_listing->get('title');
- $var->{bestViews_sortButton} = "
";
+ if($bestViews_listing){
+ $var->{bestViews_url} = $bestViews_listing->getUrl;
+ $var->{bestViews_count} = $bestViews_listing->get('views');
+ $var->{bestViews_name} = $bestViews_listing->get('title');
+ $var->{bestViews_sortButton} = "
";
+ }
# Get the MatrixListing with the most compares as an object using getLineage.
@@ -469,10 +471,12 @@ sub view {
limit => 1,
returnObjects => 1,
}) };
- $var->{bestCompares_url} = $bestCompares_listing->getUrl;
- $var->{bestCompares_count} = $bestCompares_listing->get('compares');
- $var->{bestCompares_name} = $bestCompares_listing->get('title');
- $var->{bestCompares_sortButton} = "
";
+ if($bestCompares_listing){
+ $var->{bestCompares_url} = $bestCompares_listing->getUrl;
+ $var->{bestCompares_count} = $bestCompares_listing->get('compares');
+ $var->{bestCompares_name} = $bestCompares_listing->get('title');
+ $var->{bestCompares_sortButton} = "
";
+ }
# Get the MatrixListing with the most clicks as an object using getLineage.
my ($bestClicks_listing) = @{ $self->getLineage(['descendants'], {
@@ -482,11 +486,12 @@ sub view {
limit => 1,
returnObjects => 1,
}) };
- $var->{bestClicks_url} = $bestClicks_listing->getUrl;
- $var->{bestClicks_count} = $bestClicks_listing->get('clicks');
- $var->{bestClicks_name} = $bestClicks_listing->get('title');
- $var->{bestClicks_sortButton} = "
";
-
+ if($bestClicks_listing){
+ $var->{bestClicks_url} = $bestClicks_listing->getUrl;
+ $var->{bestClicks_count} = $bestClicks_listing->get('clicks');
+ $var->{bestClicks_name} = $bestClicks_listing->get('title');
+ $var->{bestClicks_sortButton} = "
";
+ }
# Get the 5 MatrixListings that were last updated as objects using getLineage.
my @lastUpdatedListings = @{ $self->getLineage(['descendants'], {
diff --git a/lib/WebGUI/i18n/English/Asset_Matrix.pm b/lib/WebGUI/i18n/English/Asset_Matrix.pm
index 5062b2d8b..bee03b53c 100644
--- a/lib/WebGUI/i18n/English/Asset_Matrix.pm
+++ b/lib/WebGUI/i18n/English/Asset_Matrix.pm
@@ -511,7 +511,7 @@ listing,|,
},
'categories default value' => {
- message => q|Features\nBenefits|,
+ message => qq|Features\nBenefits|,
lastUpdated => 0,
},