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.

Safecracker & CAPTCHA

December 01, 2011 8:23pm

Subscribe [6]
  • #1 / Dec 01, 2011 8:23pm

    Varen

    150 posts

    Hi,

    I’m not able to make captcha show for logged in users using the safecracker form. Actually, the captcha info will show just fine but it doesn’t work to stop a poster who doesn’t enter the info, rendering it useless. I can’t find a parameter in the form to switch captcha on and I DO have “Require captcha for logged in users” set in the member preferences. What am I doing wrong?

    Peeter

  • #2 / Dec 02, 2011 7:33pm

    Sean C. Smith

    3818 posts

    Hi PeeTER,

    When you are testing this are you logged in as the Super Admin? If so then you will never be required to use a captcha. Try logging in with a different member account and see if the captcha is working.

    Sean

  • #3 / Dec 02, 2011 8:24pm

    Varen

    150 posts

    Sean,

    The form will post just fine whether I’m a member or admin. The captcha doesn’t show when I have it wrapped in the {if captcha} statement. I’m certain I have the setting for captcha set correctly in the control panel and captcha shows up properly (and works) in other areas of the site. Here’s my code:

    {if logged_in}
    <div id="pineapple">
    
    <!-- BEGIN:SAFECRACKER_FORM -->
    {exp:safecracker 
    channel="messages" 
    return="missed-connections/new_message/ENTRY_ID" 
    json="yes" 
    datepicker="no"
    include_jquery="no"
    safecracker_head="no"
    dynamic_title="[message]"
    error_handling="inline"
    rules:message="required|min_length[10]"
    }
    
    <input type="hidden" name="allow_comments" value="y" />
    <input type="hidden" name="status" value="open" />
    <input type="hidden" name="location_tag" id="location_tag" value="{segment_3}" />
    <input type="hidden" name="entry_id" value="" />
    
    <table>
    <tr>
      <td>
      <!--MESSAGE TITLE-->
      <textarea name="message" id="message" cols="45" rows="5" class="textarea" placeholder="I saw you…">/textarea></td>
      <td>input name="luke" type="submit" value="Post" id="luke" class="button_connected" >
      <div class="options"> </div>
      </td>
    </tr>
    </table>
    
    <!-- NEW_MESSAGE EXPANDO DIV -->
    <div id="new_message">
    
    
     <table width="100%" cellpadding="5" cellspacing="5" border="0">
     <tr>
     <td><input type="text" name="message_reward" value="" placeholder="Optional Reward" /> </td> 
     <td>   
     <select name="message_orientation" id="message_orientation">
      <option value="">Who Saw Who?</option>
      <option value="Man→Woman">Man→Woman</option>
      <option value="Man→Man">Man→Man</option>
      <option value="Woman→Man">Woman→Man</option>
      <option value="Woman→Woman">Woman→Woman</option>
     </select>
     </td>
     </tr>
     </table>
    
    
    
    {if captcha}
    Please enter the word you see in the image below:
    {captcha}
     <input type="text" name="captcha" value="" maxlength="20" /></p>
    {/if}
    
    </div><!--END:EXPANDO DIV -->
    
    {/exp:safecracker}
    
    </div><!-- END:DIV_PINEAPPLE -->
    {/if}{!-- END:IF LOGGED_IN --}

     

  • #4 / Dec 03, 2011 6:17am

    @nnette

    109 posts

    Yes, but have you logged out as a super, and then logged back in as a member of DIFFERENT group?  If you are logged into your super admin account, the captcha will never show.

  • #5 / Dec 03, 2011 4:57pm

    Varen

    150 posts

    Right, I’m NOT logged in as administrator (super) and logged in a simple member. It still doesn’t work.

  • #6 / Dec 03, 2011 6:59pm

    Rob Sanchez

    335 posts

    Captcha only shows for guests.

  • #7 / Dec 05, 2011 2:16pm

    Varen

    150 posts

    Thanks Rob,

    Can I have official word on this from an EE rep?

    If captcha won’t work for a logged-in user then this is definitely a feature request and I will log one. I find it hard to understand why the developers wouldn’t offer captcha for logged in users…

  • #8 / Dec 05, 2011 2:58pm

    glenndavisgroup

    436 posts

    The reason for having captcha in the first place is to make it harder for robots and guests from posting spam to your website or at least try to keep it to a minimum.

    Bur for members who took the time to register and enter their info this is over kill. You already know who they are. This is just extra unnecessary processing that the server has to do for users you already know are members.

    Any amount of processing that can be saved makes a huge difference especially when your website starts growing with members.

  • #9 / Dec 05, 2011 3:10pm

    Varen

    150 posts

    glenndavisgroup,

    Thanks for your input but I couldn’t disagree more. When you have thousands of members and a public form (safecracker) where they can add content you are bound to have problems. It’s meaningless if someone is a member or not when it comes to people (or bots) posting spam. Anything to slow them down is worthwhile. Also, by your logic there wouldn’t be captcha for logged in members when posting comments, but there is captcha for this purpose, so why not the safecracker form?

    Compared to all the zillions of other things I can do with tags and configuration of EE, adding captcha to a public posting form seems like a minimal use of resources with a real value to sites like mine.

  • #10 / Dec 06, 2011 11:29am

    Kevin Smith

    4784 posts

    Hi PeeTER,

    Can I have official word on this from an EE rep?

    Actually, Rob was on the team that originally built SafeCracker, so his answer is as good as you’d get from us on this particular question. EllisLab purchased it from Barrett Newton, of which Rob is a senior developer, earlier this year, and other than some bug fixes and minor tweaks, we haven’t radically changed how it works. I’d love to suggest adding this as a Feature Request for our devs to see.

  • #11 / Dec 06, 2011 7:51pm

    Varen

    150 posts

    Well darn, I didn’t know that. I guess Rob would be official word then. 😉

    I’ve made my feature request here.

    Thanks

  • #12 / Dec 07, 2011 10:09am

    Kevin Smith

    4784 posts

    Great! Glad we could help clear this up for you, and thanks for posting your feature request!

    Let me know if there’s anything else I can do to help.

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

ExpressionEngine News!

#eecms, #events, #releases