Forums

Forms not working if user is not logged in

Woncler 07 Mar, 2013
Hello,

My problem is that I've made a custom Joomla registration form with Chronoforms, but when I'm trying to submit it, the page just refreshes. In fact none of the forms made by Chronoforms aren't working if I'm not logged in. But if I am, they are all working just fine.

My guess is that this has something to do with Mootools, as Chronoforms is using Mootools and when I log in, the site seems to be loading Mootools so that the forms work. But I don't know how could I troubleshoot this... Here's the link to the registration form: http://tylypahka.tk/muuta/rekisteroidy

Any suggestions and help will be much appreciated!πŸ™‚
GreyHead 08 Mar, 2013
Hi Woncler,

My best guess is that there is an error message from the registration but your template isn't showing it. But that is a guess, there is no information on the front-end to tell me anything else.

I don't think that this has anything to do with MooTools. It is a problem with the form submission.

Do you see anything if you add a Debugger action?

Bob
Woncler 08 Mar, 2013
Hi,

The debugger gives me this message:

Data Array:

Array
(
    [Itemid] => 642
    [option] => com_content
    [view] => article
    [id] => 85
)
Validation Errors: 

Array
(
)
Woncler 08 Mar, 2013
I was thinking if reinstalling Chronoforms would do any difference... Is there a way to back up existing forms?
GreyHead 08 Mar, 2013
Hi Woncler,

I don't think that the problem is with the ChronoForms installation.

The On Load Debugger info looks OK, please will you add a Debugger action to the On Submit event.

Bob
Woncler 08 Mar, 2013
Hi,

I added it to both On Load and On Submit, but because submitting the form seems to just reload the form, only On Load debugger is shown.

The forms that don't work are included in articles, but I tried the same form in the frontend view -mode (http://tylypahka.tk/index.php?option=com_chronoforms&chronoform=register) and it seems to be working perfectly fine, even if I'm not logged in. And the On Submit debugger seems to be looking OK. Maybe the problem is related to including a form in an article..?
GreyHead 08 Mar, 2013
Hi Woncler,

Ah, that helps a lot - probably the form isn't submitting at all. This can happen when you have SEF URLs enabled and they get confused.

First try setting the Relative URL to No on the Form General tab (click the form name link in the Forms Manager to see it). Hopefully that will resolve the problem.

Bob
Woncler 08 Mar, 2013
Hi,

Yup, I have the SEF URLs enabled and setting Relative URL to no indeed helped! But now when I submit the form, I get redirected away from the article where the DIV tags are. Is there a workaround for this?
GreyHead 09 Mar, 2013
Hi Woncler,

I think that you can re-load the same page by capturing the submitting page URL and then using that in a ReDirect User action in the form On Submit event.

Bob
Woncler 09 Mar, 2013
Ah, I think I found the cause of this error. I turned Joomla caching off and the forms started to work like a charm. But I really would like to keep caching on as it lowers CPU-usage and bandwidth πŸ˜€ Any ideas why caching breaks Chronoforms?
GreyHead 09 Mar, 2013
Hi Woncler,

Well the problem is that many forms have dynamic content (like the key for the Captcha for example) which simply breaks if the form content is cached.

Provided that your form uses *nothing* that is linked to the current user or the user session then it will probably work with caching on. If not, it probably won't.

What you may need is a better quality cache that allows you to 'not cache' the form content in any pages. I don't know if anything like this exists (though the new Cloud Flare RailGun facility might work OK).

Bob
Woncler 09 Mar, 2013
Ok, thanksπŸ™‚

I'll test if I get any CPU limit errors with Joomla caching off (I'm on a free host). But at least we found the cause.
This topic is locked and no more replies can be posted.