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.

New Safecracker Channel Entry is always closed

April 09, 2012 11:23am

Subscribe [2]
  • #1 / Apr 09, 2012 11:23am

    mark186282

    290 posts

    This question may be related to a resolved thread.

    I’ve experienced the above condition in the past (not having a status group set for a channel, and new entries always appear as closed) - I’m having identical symptoms, but without the same solution.

    Here’s what happens:

    Only in one particular channel (“referrals”), using safecracker, any non-super-admin member
    upon submitting a new entry it is always “closed” (all data is submitted and recorded, but the status is closed)

    Here’s what I’ve done for troubleshooting:

    1.  The channel has a status group assigned to it “referral statuses”.
    2.  I have assigned the “referrals statuses” to another channel, and used safecracker to post “open” entries successfully.
    3.  I have assigned the default status group (“statuses”... which work in other channels fine) to the “referrals” channel.  Same result (all new entries are closed)
    4.  I have changed the member group of the member submitting the entry… same bad result.
    5.  The member group has permissions to post and edit entries in (members -> member groups -> edit member group)
    6.  The channel has the default status set to “new referral” (I have also changed this to “open”) - same bad result
    7.  I have used the “status = ‘New Referral’” in the safecracker options, as well as a hidden field.
    8.  I have included my MSM site name in the safecracker form - no change in results (and no other safecracker forms on my site require this… but I tested it)
    8.  I have stripped the form down to the most basic of basics, same bad result:

    <html>
    <body>
    {exp:safecracker
     channel="referrals"
     status='New Referral'
     }
    title:
    <input type="text" name='title' />
    <input type='submit'>
    {/exp:safecracker}
    </body>
    </html>

    I have modified the above code to enter in other channels, which are successful (post as “open”... this is the only channel that always posts “closed”)

    9.  I have eliminated jquery, safecracker_head, datepicker from the form… same bad result.

    ............

    This isn’t critical, as I’ve applied a patch (I am post-processing the channel entry using a quick-and-dirty extension to update the newly posted entry to desired status) - but I would like to figure out why it’s doing this…

    any ideas?


    (EE 2.4.0, MSM… but only have one site installed)

     

     

  • #2 / Apr 10, 2012 10:35am

    Dan Decker

    7338 posts

    Hi mark186282,

    Have you made sure to set the default status in the SafeCracker Module?

    Add-ons->SafeCracker

    Also, the SafeCracker tag does not support the status= parameter, so you will want to take that out of the tag.

    To hard code the status, try this:

    <input type="hidden" name="status" id="status" value="My Status">

    I look forward to your reply!

    Cheers,

  • #3 / Apr 10, 2012 9:23pm

    thefifthlion

    133 posts

    Thanks Dan,

    I was killing myself trying to figure out the same thing.

  • #4 / Apr 10, 2012 11:46pm

    mark186282

    290 posts

    Hi mark186282,

    Have you made sure to set the default status in the SafeCracker Module?

    Add-ons->SafeCracker

    Also, the SafeCracker tag does not support the status= parameter, so you will want to take that out of the tag.

    To hard code the status, try this:

    <input type="hidden" name="status" id="status" value="My Status">

    I look forward to your reply!

    Cheers,

    Thanks Dan,

    In my explanation (note items #1 and #7 above), I cover the fact that the status group has been checked, re-checked, added to other channels and checked, then used different status groups to check on this channel.  I’ve run into the situation you have described before - and was the first place I looked…. and re-looked and re-looked…. and tested in different configurations on different channels.

    + I’ve assigned a status group to this channel - FAILS
    + I’ve assigned the same status group to another channel - PASSES… on the other channel
    + I’ve assigned the default status group to this channel - FAILS
    + I’ve included the hidden field of the desired status (both the “custom” status, and the default “open” status) - FAILS
    + I’ve included the configuration variable to the safecracker opening tag (which, all that does is auto-create the hidden field described above) - FAILS

     

     

  • #5 / Apr 11, 2012 2:49pm

    Dan Decker

    7338 posts

    Hi Mark,

    I appreciate the steps you have gone through, but with all that, you did not answer my question:

    Have you made sure to set the default status in the SafeCracker Module?

    That is *separate* from all other options you mentioned. This is the Control Panel interface for SafeCracker and is relevant to our discussion here.

    Can you please verify that you have assigned a default status *through the SafeCracker Control Panel* by using the navigation menu: Add-ons->Modules->SafeCracker You should see a panel similar to this:
    Screenshot

    Just to be clear, that default status, set via the SafeCracker Control Panel, can be independent of the Channel’s default status as set in the Channel’s preferences.

    Would you mind following up with me on that?

    Thanks,

  • #6 / Apr 11, 2012 3:03pm

    mark186282

    290 posts

    Kick Ass!  thank you.

    Sincere apologies for sounding like a tool, your help is much appreciated!

    (although not documented… and probably not officially supported, if you use status=‘desired status’ in safecracker opening field, it does work.  There’s a comment in the documentation about it).

    thanks again!

  • #7 / Apr 11, 2012 5:43pm

    Dan Decker

    7338 posts

    Hey Mark!

    Bravo man! I’m glad you got sorted out!

    There are lots of little things in ExpressionEngine that need more robust documentation 😊

    If you need anything else in the future, just let me know in a new thread!

    Cheers!

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

ExpressionEngine News!

#eecms, #events, #releases