By Mostafa Norouzi on Thursday, 15 June 2017
Posted in General
Likes 0
Views 878
Votes 0
Hello

When I enable the cache plugin of Joomla, komento returns this error :
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

anybody know about the reason?
I suspect it return "Invalid token" response when you submit a new comment.

Currently we are not really sure why it return Invalid token but this is common case when the site has some extensive caching that caches the tokens, and the tokens was used to prevent csrf attacks.

By right, those cache system shouldn't cache those token on the page.
·
Thursday, 15 June 2017 22:51
·
0 Likes
·
0 Votes
·
0 Comments
·
I didn't have this problem in komento 2.
You mean version 2 did not using token?
·
Friday, 16 June 2017 15:03
·
0 Likes
·
0 Votes
·
0 Comments
·
I just checked in Komento 2 code, it seems like you are right, that time we still haven't use that token yet.

In Komento 3, we already updated it.

You can check on this file :
JoomlaFolder/components/com_komento/views/comments/view.ajax.php

// LINE 47
KT::checkToken();
·
Friday, 16 June 2017 16:07
·
0 Likes
·
0 Votes
·
0 Comments
·
So maybe Joomla Team should care of it.
Thank you for your guidance
·
Friday, 16 June 2017 16:29
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.
·
Friday, 16 June 2017 18:29
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post