ERROR: count(): Parameter must be an array or an object that implements Countable

Permalink
An unexpected error occurred.
count(): Parameter must be an array or an object that implements Countable

http://harburn.calljoe4help.com...

Only some of the pages beneath the Products menu item are failing - others work fine. I couldn't find any answers to this in the forum. This is a new site that is just being built.

Thank you.

ssailer
 
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
More error info needed...
Go to system & settings > environment > in 'Error Details' turn on 'Show the Debug Error Output'
And post back here when that is done so we can look at your site again.
ssailer replied on at Permalink Reply
ssailer
I'm not sure how much to post, so if you need more, please let me know.

/home/calljoeh/public_html/harburn.com/packages/easy_image_gallery/blocks/easy_image_gallery/elements/sortable.php


<?php defined('C5_EXECUTE') or die("Access Denied.")?>
<?php if (count($tagsObject->tags) && $options->filtering) : ?>
<ul class="filter-set" data-filter="filter" id="filter-set-<?php echo $bID?>">
<li><a href="#show-all" data-option-value="*" class="selected rounded"><?php echo t('show all')?></a></li>
<?php foreach ($tagsObject->tags as $handle =>$tag): ?>
<li><a class="" href="#<?php echo $handle?>" data-filter=".<?php echo $handle ?>"><?php echo $tag?></a></li>
<?php endforeach ?>
</ul>
<?php endif ?>
ssailer replied on at Permalink Reply
ssailer
I deleted the easy image gallery add-on, and now the pages load again. I wasn't using it, so I guess it didn't need to be there. Obviously, there is an issue with the add-on.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
If you decide to use it again, let me know and I will attempt to fix the countable errors...
ssailer replied on at Permalink Reply
ssailer
Thank you! I appreciate it!
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Here is the fix if you should need it
<?php defined('C5_EXECUTE') or die("Access Denied.")?>
<?php 
   if (is_array($tagsObject->tags) ) { ?>
   <?php if (count($tagsObject->tags) && $options->filtering) : ?>
   <ul class="filter-set" data-filter="filter" id="filter-set-<?php echo $bID?>">
    <li><a href="#show-all" data-option-value="*" class="selected rounded"><?php echo t('show all')?></a></li>
   <?php foreach ($tagsObject->tags as $handle =>$tag): ?>
   <li><a class="" href="#<?php echo $handle?>" data-filter=".<?php echo $handle ?>"><?php echo $tag?></a></li>
   <?php endforeach ?>
   </ul>
   <?php  endif ?>
<?php } ?>