0

I have a basic Freeform contact form that works in Chrome but not Safari, due to:

This form has expired. Please refresh and try again.

If I clear the EE cache and try again from Safari, it works fine. If I then try Chrome I get the above error.

I have tried using:

input type="hidden" name="XID" value="{XID_HASH}"

...But this doesn't work. I have also tried turning off secure forms in the config:

$config['secure_forms'] = "n";

...And this has no effect either.

There's another form on the site which is very similar, and I have no issues with it.

Any idea what the problem could be?

EE 2.10.1 Freeform 4.2.4, though issue was found in 4.2.3.

1
  • Ok, basic error - the contact form template was being cached by EE, hence the problem only affected that form. Turned off caching, all good. – user2265915 Feb 25 '16 at 12:40
0

I've seen this issue with the native email form, that was caused by the domain name not matching what was set in General settings.

So if your site URL/domain setting is www.example.com (with www) and you access the form page using example.com (no www) that can give the error.

The solution is to ensure the domains match. If necessary add a .htaccess rule to make sire the page redirects to the appropriate version, www or non-www.

1
  • The site is setup to use non-www, and there is a redirect rule in .htaccess (from www to non-www). EE config is set as non-www also. – user2265915 Feb 25 '16 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.