On my development site Image Captcha refresh (ICR) works nice, on this site there is no cache used.

On my production site the first refresh is working alright, the code changes for example from P4Lrn to iFL5m. When I refresh again the code is still iFL5m only the image changes. When I refresh the page in my browser I get a new code for example hmjWb. When I refresh with ICR I get the same code as above so hmjWb becomes iFL5m. When I refresh again, the code is still iFL5m only the image changes. On this site I make use of Caching and I make use of Cache exclude module for the pages with a Captcha.

Hope you can help me out.

Comments

ddrozdik’s picture

Assigned: everkuil » ddrozdik
Priority: Normal » Major
Status: Active » Needs work

Thanks for your feedback I will try to investigate your situation and find solution.

xkhaven’s picture

I added the following code to the beginning of function image_captcha_refresh_ajax_refresh() and it seemed to help.

 global $conf;
 $conf['cache'] = FALSE;

I dunno tho if it's the right way to avoid caching, but that line can be found from the original Captcha module.

everkuil’s picture

After adding your code to the beginning of function image_captcha_refresh_ajax_refresh(), refreshing works alright now for me.

Thanks,

Erik

ddrozdik’s picture

Status: Needs work » Fixed

Added fix with cache in new version.

ddrozdik’s picture

Status: Fixed » Closed (fixed)