I am building a website with Joomlashine template JSN Escape Pro.
I am using K2 for the blog section of the website.
I wanted threaded comments so decided to replace the default K2 Comments with CComments Core.
CComments component installs fine (from com_comment-5.0rc1-core.zip).
In CComment Settings I have added com_k2.
Now if I go into Plug-ins and enable K2 Plugin - CComment, when I refresh my blog page, I get these errors ...
Warning: Invalid argument supplied for foreach() in /home/intuit12/public_html/templates/jsn_escape_pro/html/com_k2/templates/default/item.php on line 338
Fatal error: Call to a member function getPagesLinks() on a non-object in /home/intuit12/public_html/templates/jsn_escape_pro/html/com_k2/templates/default/item.php on line 373
Here is what's around line 338 in the items.php file (line 338 is bolded):
<!-- Item user comments -->
<h3 class="itemCommentsCounter"> <span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?> </h3>
<ul class="itemCommentsList">
<?php foreach ($this->item->comments as $key=>$comment): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; echo (!$this->item->created_by_alias && $comment->userID==$this->item->created_by) ? " authorResponse" : ""; echo($comment->published) ? '':' unpublishedComment'; ?>">
When I disable K2 Plugin - CComment, the problem goes away.
Thanks for any help you can provide.