Cache Cleaner

cache cleanup on ajax comments submission

11 months 6 days ago #72467

Gagan's Avatar Gagan

Hi
Am using easyblog - there in comments are submitted and loaded through ajax
But - despite of using frontend cache cleaning by using tasks like - save,submit,apply
the cache is not getting cleared in easyblog on submitting comment

is it due to ajax set up they are using ?
any possibility of workaround for incoporating cache clean up on submit

sample url
www.mycarhelpline.com/index.php?option=c...try&id=474&Itemid=91

11 months 6 days ago #72472

Peter van Westen's Avatar Peter van Westen Admin

You would first have to figure out where easyblog stores its cache and if that cache gets cleared when clicking on the Cache Cleaner button.

11 months 6 days ago #72475

Gagan's Avatar Gagan

hello

cache is stored in regular cache folder and yes cache is cleared when clicking on cache cleaner button in backend
However - when submitting comment in frontend - cache is not cleaned

This is what stackideas (easyblog developer said) - Based on what i check the code, it seems like our comment also using 'save' function, but i am not sure that 'clean on task' option is it support ajax function? Because the comment save is go through the ajax call.

Could you advise -- when on frontend a comment is posted in, the cache is not automatically getting cleaned
Does cache cleaner not support ajax ?

11 months 6 days ago #72479

Peter van Westen's Avatar Peter van Westen Admin

Please try the latest development version from:
www.regularlabs.com/development-releases

11 months 6 days ago #72483

Gagan's Avatar Gagan

Hi tested the development version as mentioned
But unfortunately - no change - on submission of comment - the cache is not cleaned
if you want a copy of easyblog component - may i send it you to email, if yes may confirm your mail address pls
If you need to interact with Stackideas team - i may direct you to there mail,

thanks

11 months 6 days ago #72484

Peter van Westen's Avatar Peter van Westen Admin

Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Hidden text' button in the forum editor to hide the confidential information.

11 months 6 days ago #72502

Gagan's Avatar Gagan

Hi
Am sorry but i dont have a test copy of site, only the final production version is there
Should i send you the copy of easyblog component through email
can you pls confirm your mail

11 months 6 days ago #72511

Peter van Westen's Avatar Peter van Westen Admin

I have already sent them a request for the pro version of EasyBlog.
So let's wait for that... :)

Can you describe how I can replicate the issue?
I don't use EasyBlog, so I am not sure what to do to get the ajax thing up and running...

11 months 6 days ago #72541

Gagan's Avatar Gagan

Hello, Ok thanks
Here is how you can replicate the issue

1. Ofcourse cache should be enabled (either jotcache or joomla system cache)

2. Any guest user (who is not a registered user) on the site posts a comment on blog post

3. Now any other user also visits on blog post and try and making a comment - he will get JSON error, which is a token error due to the token already cached by first user is not cleared

How i replicated -
by using other browser for second user and try and making a comment in new browser
Been it presumes that a second visitor comes on page, but unable to make comment due to cache not cleared even after submitting the comment

Thanks

11 months 5 days ago #72564

Peter van Westen's Avatar Peter van Westen Admin

11 months 5 days ago #72586

Gagan's Avatar Gagan

Hi - thanks tried development pro release
but :( - dint worked
cache is not cleaned after submitting comment in front end

11 months 5 days ago #72595

Peter van Westen's Avatar Peter van Westen Admin

I will look into this deeper after the weekend...

11 months 4 days ago #72623

Peter van Westen's Avatar Peter van Westen Admin

As far as I can tell the ajax call from the comments form does not have an input task attached to it, like Joomla has with stuff like save and apply.

The tasks you place in the Cache Cleaner tasks field are matched to the value from:

JFactory::getApplication()->input->get('task')

This is empty in the case of the the EasyBlog comments form.

11 months 4 days ago #72635

Gagan's Avatar Gagan

Hello Peter,

Ok - appreciate in taking time to debug same,
what do you suggest now, i dont think that easyblog developer may change code on my statement

is there a way out so that cache can be cleaned on submission ?

11 months 4 days ago #72636

Peter van Westen's Avatar Peter van Westen Admin

You could try and add a hidden form element with a task name (and value save) to that comment form.
And see if that doesn't mess the functionality up. Good chance EasyBlog will ignore it. But it should trigger Cache Cleaner.

You could do this via template overrides. StackIdeas support could probably help you with that and tell you if this is an ok approach.