1. Steve Genco
  2. Bugs
  3. Tuesday, 21 May 2013
  4.  Subscribe via email
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.
Responses (9)
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
What k2 version are you using?
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 1
Accepted Answer Pending Moderation
version 2.6.6.
  1. more than a month ago
  2. Bugs
  3. # 2
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
ah wait.
The error message is comming from this file:
templates/jsn_escape_pro/html/com_k2/templates/default/item.php on line 338

so this is the template override that is making the problem. Would you go to

templates/jsn_escape_pro/html and rename the com_k2 folder to "asd" or whatever.
Now when you go to the k2 entry do you see the comments? If that is the case, then you need to contact the template provider and ask him to check their layout override as it contains an error.

Regards,
Daniel
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 3
Accepted Answer Pending Moderation
I followed your instructions and still get an error, although the item.php file breaks ata different point:

Warning: Invalid argument supplied for foreach() in /home/intuit12/public_html/components/com_k2/templates/default/item.php on line 599

Fatal error: Call to a member function getPagesLinks() on a non-object in /home/intuit12/public_html/components/com_k2/templates/default/item.php on line 656

I have attached the php file for your reference.
  1. more than a month ago
  2. Bugs
  3. # 4
Accepted Answer Pending Moderation
Don't know if this is helpful, but I noticed the CComments section is appearing on regular Joomla articles, because the com_content component is activated.

However when I just tried to add a comment to an article, it hangs on the Save button, which sticks on "Saving ...". See attached image.

I would guess that means the problem is not with the k2 customization for this template.

Sorry for the trouble.
  1. more than a month ago
  2. Bugs
  3. # 5
Accepted Answer Pending Moderation
I just reloaded the page (refresh) and CComment seems to recognize that a comment is there, but now it is hanging on the Loading operation. See attached.

Also, looked in the CComment "manage comments" admin section, and it thinks the comment is there. See second attachment. It fixes the hang on Loading ... when I delete the comment from the admin panel.
  1. more than a month ago
  2. Bugs
  3. # 6
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
Go to global config -> server -> error reporting -> set it to none. does it work properly after that?

Also can I see your page?


And I've just tested it with k2 2.6.6 and it works as expected. No errors whatsoever.
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 7
Accepted Answer Pending Moderation
I turned off error reporting and the commenting works fine on com_content.
I enabled nested comments and that works, but I was expecting the replies to be indented below the comment they are replying to, but that doesn't seem to be happening. See attached screenshot.

Doesn't fix the k2 commenting problem, however. That is still occurring.

My website is offline, but I have given you an account so you can access it.
site: xxxxxxxx
login name: Daniel
pw: xxxxxxx
  1. more than a month ago
  2. Bugs
  3. # 8
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
Please send access details to daniel@compojoom.com
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. Bugs
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Last questions

Error received? Class "XMLReader" not fo
Just installed the Pro version of Hotspots, but am getting an error when I try t...
1 Replies
Posted on Wednesday, 17 April 2024
  • Resolved
  • New
  • Questions on new installation...
    Working on getting this set up... https://eastend2024.joepolecheck.com/rumma...
    1 Replies
    Posted on Wednesday, 17 April 2024
  • New
  • Links aus Veranstaltungsübersicht funktionieren ni
    Nach der Migration von Joomla 3.10 auf Joomla 5.0.3 treten folgende Probleme auf...
    2 Replies
    Posted on Monday, 08 April 2024
    Custom Hotspot Marker fails to load
    I just updated from Joomla 3 to Joomla 4.3.4 and Hotspots 6.0.12. I decided to e...
    0 Replies
    Posted on Tuesday, 09 April 2024
    Language parameter in the link to the comment
    Hello. 1) I have a multilingual website (3 languages). If someone added a comme...
    0 Replies
    Posted on Saturday, 06 April 2024