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.

Comment Form Redirecting to Wrong Page on CAPTCHA Error/Empty

October 23, 2013 4:00pm

Subscribe [2]
  • #1 / Oct 23, 2013 4:00pm

    msmith29063

    75 posts

    I have a comment form (on a blog view page) that redirects to another contact page when the CAPTCHA field is empty or incorrect. Why is it redirecting to the other page? How can I redirect it back to the same page with an error message?

    The only comment:form parameter I’m using is channel.

    Thank you for your help.

  • #2 / Oct 30, 2013 3:33am

    msmith29063

    75 posts

    Any ideas here? Thank you for your help.

  • #3 / Oct 30, 2013 6:33am

    Ralph

    78 posts

    I’ve had problems with the CAPTCHA before but I haven’t seen that happen. Can you post your template code?

  • #4 / Oct 30, 2013 1:12pm

    msmith29063

    75 posts

    It’s basically the demo form from the EE site:

    {exp:comment:form channel="blog"}
          {if logged_out}
           <label for="name">Name:</label> <input type="text" name="name" value="{name}" size="50" /><br > 
           <label for="email">Email:</label> <input type="text" name="email" value="{email}" size="50" /><br > 
           <label for="location">Location:</label> <input type="text" name="location" value="{location}" size="50" /><br > 
           <label for="url">URL:</label> <input type="text" name="url" value="{url}" size="50" /></p> 
          {/if}
          <label for="comment">Comment:</label>
    
          <textarea name="comment" cols="70" rows="10">{comment}</textarea></p>
          <label><input type="checkbox" name="save_info" value="yes" {save_info} /> Remember my personal information</label>
     
          <label><input type="checkbox" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments?</label>
          {if captcha}
           <label for="captcha">Please enter the word you see in the image below:</label>
     
           {captcha}
    
            <input type="text" name="captcha" value="{captcha_word}" maxlength="20" /></p>
          {/if}
          <input type="submit" name="submit" value="Submit" />
         {/exp:comment:form}

    I thought by default it would return the user to the same page when processed. Not sure why it’s processing to the Contact page (which also has a form). Thanks for your help.

  • #5 / Oct 30, 2013 1:24pm

    Ralph

    78 posts

    Try adding the parameters error_handling=“inline” and return=”{current_url}” into {exp:comment:form channel="blog"} You’ll also need to add error messages for inline errors, more info here: http://ellislab.com/expressionengine/user-guide/modules/channel/channel_form/#error-handling

  • #6 / Oct 30, 2013 11:49pm

    msmith29063

    75 posts

    Still not working. You can see the issue here:

    http://www.jennamariephoto.com/blog/view/holiday-mini-sessions/

    I’ve gone through and checked all my settings in the admin site. Does anyone have any ideas?

    Thank you.

  • #7 / Nov 01, 2013 12:33pm

    Ralph

    78 posts

    It looks like it redirects to your /contact page no matter what you put in the CAPTCHA box. What’s in your channel settings for blog? Go to Admin > Channel > blog Channel Preferences. There is Comment Page URL setting and a load of settings under Channel Posting Preferences.

  • #8 / Nov 01, 2013 1:27pm

    msmith29063

    75 posts

    Comment Page URL is empty. I checked all the other channel settings against other EE sites I’ve done with blog comments that work correctly.

    I’d love to have someone from the support team chime in. Are they still on the forums? Or do I have to purchase support?

    Thanks.

  • #9 / Nov 04, 2013 4:54pm

    msmith29063

    75 posts

    Any other ideas out there? Am I going to have to purchase EE support to get this figured out?

    Thanks for your help.

  • #10 / Nov 05, 2013 4:03am

    Ralph

    78 posts

    You could try using Freeform for contact forms instead. I use it, it’s pretty good. Or if you want comments on an article you can use Disqus.

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

ExpressionEngine News!

#eecms, #events, #releases