Status Update from Safecracker Form Issue
Posted: 01 October 2010 01:22 AM   [ Ignore ]
Has a Great Personality
Rank
Total Posts:  36
Joined  2010-09-08

I’m not sure if this is a safecracker issue or not, but I think it is.  I have a very simple safecracker form to allow certain users to change the status of the entry that they are viewing.  This worked previously, but is not working now.  The last time I checked it I was running safecracker build 20100913 and it was working. I upgraded to 20100924 the day it came out and hadn’t checked this form since then, but it’s not longer working.  I haven’t changed anything else in the code, so my best guess is that it’s a bug that might have been introduced in 20100924.  What’s happening now is that when you submit the status change, it always changes the status to “Open”, no matter what is chosen in the drop down menu.  Here’s the code I’m using:

{if group_id == "1"}
{exp
:safecracker channel="channel_name" return="group/template/ENTRY_ID" entry_id="{segment_3}"}                
     
<input type="hidden" name="entry_date" value="{entry_date}" />
          
{status_menu}
        
<select name="status" id="status">
            
{select_options}
        
</select>
      
{/status_menu}
      
<input type="submit" name="submit" value="Submit" />
{/exp:safecracker}
{
/if} 

Any idea if this is a safecracker issue?

Thanks!

Profile
 
 
Posted: 01 October 2010 01:24 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Do you have a default status for that channel selected in your SC settings?

Profile
 
 
Posted: 01 October 2010 01:27 AM   [ Ignore ]   [ # 2 ]
Has a Great Personality
Rank
Total Posts:  36
Joined  2010-09-08

Just checked and yes, I have “Open” selected as the default status.  Should I remove that and have no default status selected?

Profile
 
 
Posted: 01 October 2010 01:28 AM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Yep. What that setting does is ignore whatever status was submitted and uses the default one.

Profile
 
 
Posted: 01 October 2010 01:33 AM   [ Ignore ]   [ # 4 ]
Has a Great Personality
Rank
Total Posts:  36
Joined  2010-09-08

Got it.  One question then - I have another safecracker form set up for this same channel that is accepting entries, not just changing the status.  These entries need to always be submitted with the status set to “open”.  So if I remove the default status setting for that channel, what’s the best way to set the status for the other entries - I don’t want to offer a choice of status when the initial entry is submitted.

Thanks again for the quick support.

Profile
 
 
Posted: 01 October 2010 01:34 AM   [ Ignore ]   [ # 5 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

On that safecracker form, add a status=“open” parameter.

Profile
 
 
Posted: 01 October 2010 01:47 AM   [ Ignore ]   [ # 6 ]
Has a Great Personality
Rank
Total Posts:  36
Joined  2010-09-08

That works great.  For some reason I thought the status=“open” parameter wasn’t working yet in safecracker.

Thanks for your help!

[ Edited: 01 October 2010 01:56 AM by Stephen T ]
Profile
 
 
Posted: 01 October 2010 05:11 PM   [ Ignore ]   [ # 7 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

The solution is to not have a default status in your SC settings for the submissions channel.

Profile
 
 
Posted: 01 October 2010 08:13 PM   [ Ignore ]   [ # 8 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

You know what happened? That default status feature was broken and not working at all until recently. Now that it’s been fixed this issue is cropping up. I’m thinking of making default status apply only to publish (not edit). What do you guys think of that? Would that be more useful to you?

Profile
 
 
Posted: 05 October 2010 07:38 PM   [ Ignore ]   [ # 9 ]
Has a Great Personality
Rank
Total Posts:  36
Joined  2010-09-08

Sorry it took me a while to get back to this.

I would agree - I think that having the default status only apply to new entries makes more sense.  Once the entry is in the system and already has a status applied to it, it doesn’t make as much sense to force a default, especially ff you’re trying to change the status from within a safecracker form.  Thanks for getting back to us on this Rob.

Profile
 
 
Posted: 06 October 2010 08:28 PM   [ Ignore ]   [ # 10 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

OK you guys have convinced me. I’ll make default status work only on publish in the next version.

Profile
 
 
Posted: 06 October 2010 08:40 PM   [ Ignore ]   [ # 11 ]
Has a Great Personality
Rank
Total Posts:  36
Joined  2010-09-08

Wonderful - thanks Rob.

Profile