Keyword

Error when adding comment

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
7 years 1 month ago - 7 years 1 month ago #164576 by Steven Trooster
Error when adding comment was created by Steven Trooster
If one adds a comment to an article and submits, the following message is displayed on a blank page:
{"message":"Comment added! Refresh page...","cssClass":"k2FormLogSuccess","refresh":1}

The comment is saved, but the user is left clueless.

K2 version 2.8.0 on Joomla 3.8.1
Last edit: 7 years 1 month ago by Steven Trooster.

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #164579 by william white
Replied by william white on topic Error when adding comment
I get the same errors with the default k2 template and recaptua disabled, and no more with error rerporting set to development.
Will have to look into this as it may need to be reported as an issue
Maybe Krikor has already seen it before

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 month ago #164598 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error when adding comment
Hello,

Are you getting any JS errors in browser's developer tools console tab?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #164604 by william white
Replied by william white on topic Error when adding comment
None

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
7 years 1 month ago #164612 by Steven Trooster
Replied by Steven Trooster on topic Error when adding comment
On the actual item page itself I get an error. In the k2.frontend.js the first line of code:
var $K2 = jQuery.noConflict();
Can't find variable: jQuery

When comparing this with previous versions of K2, there was a separate file k2.noconflict.js with a single line of code, which is exactly the same.

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
7 years 1 month ago #164613 by Steven Trooster
Replied by Steven Trooster on topic Error when adding comment
I've narrowed down the problem: when the jQuery handling settings in K2 are set to 'don't load jQuery', the error occurs. If you set jQuery to one of the other options, then it's fine. There is no need to load jQuery in Joomla 3. Turning this option on might result in conflicts between jQuery versions.

It is nice of you to support older versions of Joomla (1.5/2.5) with a feature like this, but we have to move on. We don't need to encourage site owners to stick with old unsupported and unsafe Joomla sites.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 month ago #164621 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error when adding comment
If this error occurs, then the template is not loading jQuery, not all J!3 sites load jQuery by default (this is the cause of this issue).
This is why this setting is mandatory across all Joomla! versions.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 1 month ago #164635 by william white
Replied by william white on topic Error when adding comment
Thanks, that fixed it. I remember having to turn it on before!

Please Log in or Create an account to join the conversation.

  • Steven Trooster
  • Steven Trooster's Avatar Topic Author
  • Offline
  • Premium Member
More
7 years 1 month ago - 7 years 1 month ago #164637 by Steven Trooster
Replied by Steven Trooster on topic Error when adding comment
I figured out that the jQuery Easy system plugin was set wrong. Strangely enough I didn't tough the settings for a long time. But maybe I recently set K2 to load no jQuery.
Last edit: 7 years 1 month ago by Steven Trooster.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 month ago #164663 by Krikor Boghossian
Replied by Krikor Boghossian on topic Error when adding comment
It was changed a few versions ago, not that long ago though.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum