By neg0 on Tuesday, 18 August 2015
Posted in Technical Issues
Replies 9
Likes 0
Views 1.1K
Votes 0
Hi,

I'm having an issue with komento & Varnish. When i try to add a comment as a guest i get a token error. This is because the whole page is getting cached with varnish, including the token.

Is there a way to use Komento along with Varnish ? (whitout disabling the token)

Thank you
i'd used varnish for some weeks and i'd get many sessions bugs,
for komento i think thats worked without issues.
·
Tuesday, 18 August 2015 01:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for your answer. Did you try adding a comment without being loggued on a cached page ?
·
Tuesday, 18 August 2015 01:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey neg0,

I am really sorry that delay of this reply,

Perhaps you can provide us with your Joomla backend and FTP access so we can better have a look?

May i know is there a way temporary disable this Varnish cache?
·
Wednesday, 19 August 2015 17:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

I've added the FTP and admin details.I've temporarly disabled the token by commenting line 103 to 107 of "components\com_komento\helpers\ajax.php". It would be difficult to stop varnish, but you can add a variable to url (example : http://www.url.com?refresh=1) to reload page without varnish. You'll need to change this variable each time to bypass varnish (reload=2, reload=3...).

Thank you
·
Wednesday, 19 August 2015 18:00
·
0 Likes
·
0 Votes
·
0 Comments
·
hey neg0,

I am sorry that delay of this reply,

I've tried to access in your Komento backend setting but hitting this :

Error
You are not authorised to view this resource.


If let say when load one of the article then it will automatically clean the cache, is it will work for you?

// Clear the component's cache on the page
$cache = JFactory::getCache('com_komento');
$cache->clean();
·
Thursday, 20 August 2015 17:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

The clear cache won't help because the problem isn't coming from joomla's cache but Varnish one. I'm trying to find a solution to update the token value when the page is in Varnish cache. Maybe by updating the token by ajax after load, or by using the varnish ESI.
Do you have an idea how we could solve this ?

Thank you,
Jo
·
Friday, 21 August 2015 17:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nego,

I am really sorry for the delay of this reply as it weekends for all of us here.

I'm not really have any idea on workaround for this. Perhaps you can try to follow the url here on how to exclude certain folder in your joomla to be exclude for cache, http://www.blinkdata.com/ignoring-a-folder-in-varnish/ .
·
Monday, 24 August 2015 18:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

The link is interesting but wont resolve the token problem
Thank you for the help anyway.
·
Monday, 24 August 2015 21:48
·
0 Likes
·
0 Votes
·
0 Comments
·
I am sorry that do not help much you here.
·
Wednesday, 26 August 2015 23:34
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post