cf4 on j!1.5 - fom in article - captcha - joomla cache error

zingales 26 Jul, 2012
Hi, I've published an article containing some decorative html and a Chronoforms_V4_RC3.4.1_J1.5 form, in Joomla 1.5.26 with caching enabled

Captcha keeps saying that a wrong code has been entered.

As i deactivated joomla cache, the captcha in the form worked again.

It seems the captcha image is cached (as at the same time the site shows the same image on every browser connected to the form on the website, even from different machines), and it isn't regenerated when reloading the page.

I think joomla cache is interfering badly with this captcha.
Is there a fix for this? I don't like to keep off my cache, it would affect badly on page loading times and therefore in google positioning of the website. Not a choice I'd go for.
I used qcontacts in the past, and its captcha didn't break when joomla cache is enabled.

waiting for a fix, is there a way to disable joomla cache just for a single page?

thanks anybody in advance.

robert
GreyHead 26 Jul, 2012
Hi Robert,

As far as I know this is a Joomla! feature. The caching code runs and loads the cached page before the form plug-in is called (so actually the plug-in is never called) so there is nothing that can be done by ChronoForms to fix this problem. If you want caching on then you need to use direct ChronoForms URLs for your forms and not use the Plug-in.

Bob
zingales 26 Jul, 2012
I understand what you mean, but I'm not sure this is the only possible way.
There must be a way to leave caching on and a working captcha, INSIDE a JOOMLA! article.

Ajax, perhaps?
Or a stand alone php page creating the captcha outside the limitating joomla cache, returning just an image. then this image could be loaded *dinamically* with JS into the article embedded in the form with your plugin.

I'm not too sure of that, but it seems a good argument to speculate on, doesn't it?

I think that with a small amount of coding, it should be possible to overcome this problem with the plugin. it would be a great improvement.
Caching is a great thing. and in big or complex sites it can make a great difference.

On the other side, I now switched to the chronoform link-to-form method, so I don't embed the form into any article. I also managed to insert some pure html in the custom html item on top of the form, recreating the desired text and decoration.

It would be great if we could add an HTML item in the form, and edit it with the default joomla editor.
Chronoforms is committed to simplify day by day forms editing, and I think that giving the user the ability to insert html code with a fast WYSIWYG editor would simplify our work very much!

Thanks in advance,
robert
GreyHead 27 Jul, 2012
Hi Robert,

If you think about how the captchas work; a unique ID is saved in the user session, then some matching code is included in the form. You don't want to relay on JavaScript because it is too easily bypassed, and you don't want to open the form up to XSS attacks. That pretty much stops anything that would allow caching. Caching and Captchas are mutually incompatible.

What is needed is a selective cache that allows parts of the page to be loaded live and Joomla! caching doesn't support that as far as I know.

As I said before, if the page is cached, the plug-in code never runs so no amount of coding in the plug-in will make any difference.

I have found this CacheControl extension that claims to gives more control over which page URLs are cached. That might help if the form is only on a few pages.

Bob
This topic is locked and no more replies can be posted.