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 form only works for logged in people. For logged out, it only outputs JS, no form.

August 16, 2011 4:02am

Subscribe [3]
  • #1 / Aug 16, 2011 4:02am

    JohanD

    59 posts

    Hi all,

    I have a safecracker form which has been working fine for a few months now, and only signed in members were allowed to submit new entries. Updates, 2.1.3, 2.1.5, 2.2.1, 2.2.2 all went smoothly and I’ve never had issues.

    My client now wants to change it to allow anonymous submissions, but when I’m not signed in, I can’t get the SC form to work at all.
    All I get is the JS files, that are usually appended to the actual form, but the form is missing. This is maybe related to http://ellislab.com/forums/viewthread/192125/#906608
    It works fine when I’m signed in, and any group seems to work just fine. 

    The form is based on the AJAX-driven Entry Form, but I’ve tried with the two other examples in the SC documentation page, in empty templates, and the result is the same.

    Allow guests to post entries? is checked. If this is unchecked, and don’t get anything at all. When it’s checked I just get the JS files.
    The member_id to use for guests is set in the CP, and in the form params.
    Captcha files are created on the server for each request, even if nothing is displayed.

    With debugging on, in the index.php file, no errors are displayed. Template Debugging can’t be turnd on for logged off members if theat might have been helpful.

    Does anyone have any idea what could be causing this?

    Thanks,
    Johan

  • #2 / Aug 16, 2011 5:16pm

    Sue Crocker

    26054 posts

    Hi, JohanD. Does the member ID in question have access to that particular channel, and access to the control panel? In other words, if you were to manually log in as that user, would you be able to post to that channel?

  • #3 / Aug 16, 2011 8:23pm

    JohanD

    59 posts

    Silly me, that should have been obvious… Thanks so much!

    It would be nice if it could at least display some “Not authorised.” message instead of a blank page. Should I post a feature request?

  • #4 / Aug 17, 2011 3:50am

    John Henry Donovan

    12339 posts

    Johan,
    Glad you are up and running again. You would need to add {if logged_in} conditionals and you can redirect unauthorized members based on that.Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases