ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Form stopped working suddenly (I haven't changed the code of the website)

March 30, 2011 2:57pm

Subscribe [4]
  • #1 / Mar 30, 2011 2:57pm

    mazzal

    87 posts

    Hi there,

    I was informed that the contact form on this page has stopped working: http://www.schnappsbarruapehu.com/index.php/site/contact-bar-ruapehu/

    I haven’t done any work to this website in ages and so I’m not responsible.

    I got an email from my client saying that this morning, I checked it and it wasn’t working. I just checked it there and it is working fine. Any ideas?

    I’m guessing it may be due to the recent emergency move to new servers?

    Thanks

  • #2 / Mar 31, 2011 5:40am

    Greg Salt

    3988 posts

    Hi mazzal,

    So the contact form is working correctly now? What was happening? Was there an error message or the email was just never received?

    Cheers

    Greg

  • #3 / Mar 31, 2011 7:07am

    mazzal

    87 posts

    Apparently not, I just got an email saying that the client tested the form again and got this:

    “The following errors were encountered
      * You are not authorized to perform this action”

    Cheers

  • #4 / Mar 31, 2011 7:41am

    Mark Bowen

    12637 posts

    I just tested out that form. Pretty sure nothing got sent though as I received this error :

    The following errors were encountered

    You must submit the word that appears in the image

    Return to Previous Page

    It’s a little strange as I don’t see a captcha field anywhere on that page or in the source code. Have you perhaps recently turned on captcha support for the contact form (if you’re using the standard ExpressionEngine code for that form and not something like Freeform? Saying that I think they both respect the same setting here though.)

    Admin > System Preferences > Email Configuration > Enable CAPTCHAs for Tell-a-Friend and Contact emails

    Has that perhaps been set to Yes where it might not have been previously?

    Best wishes,

    Mark

  • #5 / Mar 31, 2011 8:24am

    mazzal

    87 posts

    Thanks for the response Mark.

    Enable captchas is set to yes, but this is not something that I have not recently changed. Perhaps I should add a captcha in?

    Would it help if I posted the code for the form?

    Cheers

  • #6 / Mar 31, 2011 8:33am

    Mark Bowen

    12637 posts

    Yep posting the code could help and as mentioned above I didn’t see a CAPTCHA in your HTML code output although I may have possibly missed it somewhere as it was just a quick cursory glance. There definitely isn’t a place to put in the CAPTCHA on your page though so this is definitely causing an issue. Not sure if it’s the same issue your client was having as they got a different error message entirely but maybe clearing this up will help out with that. If not then there are a few things that might be causing their problem.

    Best wishes,

    Mark

  • #7 / Mar 31, 2011 8:36am

    mazzal

    87 posts

    Thanks Mark. Here is my code for the form:

    {exp:email:contact_form user_recipients="false" recipients="[email protected]" charset="utf-8" return="{site_url}/index.php/thanks"}
    
    <h1>Contact Schnapps</h1>
    <h2>If you would like to contact Schnapps, please use the details below or you can <a href="http://{site_url}/index.php/findus-ruapehu-tongariro">come in and see us.</a></h2>
    <h3>Phone</h3>
    <p>(+64) 07 8922 788</p><h3>Postal Address</h3>
    <p>Schnapps Bar</p>
    
    <p>P.O. Box 54</p>
    
    <p>National Park Village 3948</p>
    
    <p><label for="from">Your Email:</label></p>
    
    <p><input type="text" id="from" name="from" size="40" maxlength="35" /></p></p>
    
    <p><label for="subject">Subject:</label></p>
    
    <p><input type="text" id="subject" name="subject" size="40"/></p></p>
    
    <p><label for="message">Message:</label></p>
    
    <p><textarea id="message" name="message" rows="18" cols="40"></textarea></p>
    
    <p><input name="submit" type='submit' value='Submit Form' /></p></p>
    
    <p>{/exp:email:contact_form}

    Perhaps I need to ADD a captcha?

    Thanks again

  • #8 / Mar 31, 2011 8:45am

    Mark Bowen

    12637 posts

    Hiya,

    Yep if you have CAPTCHAS set to Yes in the system preferences then you will need to add it to the form or you will receive that error.

    If you take a look at the documentation here then you can add that field in fairly easily to what you have already :

    {exp:email:contact_form user_recipients="false" recipients="[email protected]" charset="utf-8" return="{site_url}/index.php/thanks"}
    
    <h1>Contact Schnapps</h1>
    <h2>If you would like to contact Schnapps, please use the details below or you can <a href="http://{site_url}/index.php/findus-ruapehu-tongariro">come in and see us.</a></h2>
    <h3>Phone</h3>
    <p>(+64) 07 8922 788</p><h3>Postal Address</h3>
    <p>Schnapps Bar</p>
    
    <p>P.O. Box 54</p>
    
    <p>National Park Village 3948</p>
    
    <p><label for="from">Your Email:</label></p>
    
    <p><input type="text" id="from" name="from" size="40" maxlength="35" /></p></p>
    
    <p><label for="subject">Subject:</label></p>
    
    <p><input type="text" id="subject" name="subject" size="40"/></p></p>
    
    <p><label for="message">Message:</label></p>
    
    <p><textarea id="message" name="message" rows="18" cols="40"></textarea></p>
    
    <p>{if captcha}<br />
    Please enter the word you see in the image below:<br />
    {captcha}</p>
    
    <p><input type="text" name="captcha" value="" maxlength="20" /></p><br />
    {/if}</p>
    
    <p><input name="submit" type='submit' value='Submit Form' /></p></p>
    
    <p>{/exp:email:contact_form}

    Let’s see if that gets rid of the CAPTCHA problem and hopefully your clients problem too first and if it fixes the CAPTCHA problem but not the client problem then that will be something else to look at.

    Best wishes,

    Mark

  • #9 / Mar 31, 2011 10:11am

    mazzal

    87 posts

    Thanks.

    Again, its still working from my end. And when I log out the captcha shows.

    I’ve asked my client to test it and send me through any error reports he might get (he’s in NZ so might be asleep by now!).

    What I don’t understand is why it stopped working all of a sudden!

    Thanks very much for your help

  • #10 / Mar 31, 2011 10:33am

    Mark Bowen

    12637 posts

    Not sure why it would stop working for your client all of a sudden although it could be that their IP isn’t getting sent to the ExpressionEngine system for whatever reason. Maybe they recently went behind a new firewall or something like that and that could be doing it too possibly?

    Let us know how it goes with your client testing it out now though.

    Best wishes,

    Mark

  • #11 / Apr 01, 2011 4:49pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Mark.

    mazzal - have your client do a screen shot to ensure they are or aren’t seeing the captcha. I see it when looking now.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases