×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Can't install CComments with K2 plugin

Can't install CComments with K2 plugin 10 years 11 months ago #20796

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
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.

Can't install CComments with K2 plugin 10 years 11 months ago #20797

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What k2 version are you using?

Can't install CComments with K2 plugin 10 years 11 months ago #20798

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
version 2.6.6.

Can't install CComments with K2 plugin 10 years 11 months ago #20799

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
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

Can't install CComments with K2 plugin 10 years 11 months ago #20800

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
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.

Can't install CComments with K2 plugin 10 years 11 months ago #20803

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
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.

Can't install CComments with K2 plugin 10 years 11 months ago #20804

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
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.

Can't install CComments with K2 plugin 10 years 11 months ago #20805

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
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.

Can't install CComments with K2 plugin 10 years 11 months ago #20808

  • Steve Genco
  • Steve Genco's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
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

Can't install CComments with K2 plugin 10 years 11 months ago #20811

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Please send access details to This email address is being protected from spambots. You need JavaScript enabled to view it.
  • Page:
  • 1
Time to create page: 0.110 seconds