I’ve installed SPForm on 2.0.6 and I get the contact form nicely but when I submit I get the following error.
There were problems with your submission.
* This form was accessed from an unauthorized server!()
This may be through no fault of your own and is probably not immediately correctable.
Please come back and try again later.
Any ideas?
Crawford Paul
Bridgecourt Web Design - Proudly using ModX CMS
Serving Welland, Niagara, Ontario, Canada and the world!
http://www.bridgecourt.com
Check the formProcAllowedReferers property on the Properties tab of the SPForm snippet. The usual setting is yoursite.com,www.yoursite.com or localhost for a local install. It needs to match the domain name you see in the URL of the contact page.
If that default property setting is blank, it means that the install didn’t work properly and there may be other settings that need adjusting.
Hi Bob, thanks for the suggestion but the setting was correct and installed properly.
Crawford
Crawford Paul
Bridgecourt Web Design - Proudly using ModX CMS
Serving Welland, Niagara, Ontario, Canada and the world!
http://www.bridgecourt.com
I don’t know what to tell you. The only thing I know of that triggers that error is a mismatch between that setting and what’s set in the server variable ("http_referer").
Is $formProcBlankRefOkay set to ’Yes’? That’s supposed to prevent that error.
The code is in the _check_allowed_referer() function in the spformproc class file.
Turn on the LogOnReferer setting and try again. Then check the MODx error log. There should be something there.
If everything else fails, just put this at the top of that function:
That test isn’t worth much these days anyway.
Could it have anything to do with the fact that my install is in a subfolder called /modx?
Crawford Paul
Bridgecourt Web Design - Proudly using ModX CMS
Serving Welland, Niagara, Ontario, Canada and the world!
http://www.bridgecourt.com
Possibly. Try the logOnReferer setting and see what turns up in the MODx error log (under Reports in the Top Menu). It should report the two values it’s comparing and let you correct the formProcAllowedReferers setting.
I just tried this on another domain (same server) and I got the same error. So I’m going to dig into it a bit more. The log shows:
[2010-12-30 00:13:33] (ERROR @ /modx/index.php) [] Illegal Referer. ()
This was in the log for both sites. I guess I need to check the "http_referer". On a shared server do I need to contact support for that?
Crawford Paul
Bridgecourt Web Design - Proudly using ModX CMS
Serving Welland, Niagara, Ontario, Canada and the world!
http://www.bridgecourt.com
Many servers just don’t report it.
Try setting formProcBlankRefOkay to ’Yes’ in the default properties (or the snippet tag).
BTW, are the default properties not set? There’s been a problem lately with then not getting set on install.
If they’re not set, you’ll have other problems once this is sorted.
I’m having the same problem. I have all the domains listed (with and without www.) and I keep on getting the message.
Is it possible to disable the refer check?
Thanks!