PHP error when accessing Safecracker channel entries using non-super-admin member group
Posted: 20 January 2011 03:01 AM   [ Ignore ]
Has a Great Personality
Rank
Total Posts:  49
Joined  2010-12-07

Things work swimmingly when I’m logged in with my Super Admin user.  But member groups who should by all rights have access to the channel entries Safecracker manages I get the following errors:

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: assigned_channels
Filename: cp/content_publish.php
Line Number: 2122

A PHP Error was encountered
Severity: Warning
Message: in_array() [function.in-array]: Wrong datatype for second argument
Filename: cp/content_publish.php
Line Number: 2122

I’m using EE 2.1.3 and Safecracker 1.0.2 on a LAMP stack with Dreamhost.  I’ve checked the permissions for the Member Group and they should be able to create and edit entries in this channel.  If I give the user Super-Admin privileges, then everything works, but that’s not really an ideal solution.

Any assistance would be greatly appreciated.

Profile
 
 
Posted: 20 January 2011 03:25 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Does this happen when you view the form or submit the form?

Profile
 
 
Posted: 20 January 2011 03:33 AM   [ Ignore ]   [ # 2 ]
Has a Great Personality
Rank
Total Posts:  49
Joined  2010-12-07

It happens when someone from the member group edits an existing entry that was submitted via Safecracker.

Profile
 
 
Posted: 20 January 2011 03:44 AM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Wait, do you mean in the control panel?

Profile
 
 
Posted: 20 January 2011 03:47 AM   [ Ignore ]   [ # 4 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Looks like this is an EE bug: http://expressionengine.com/bug_tracker/bug/15011/

Profile
 
 
Posted: 20 January 2011 04:02 AM   [ Ignore ]   [ # 5 ]
Has a Great Personality
Rank
Total Posts:  49
Joined  2010-12-07

That did it, thanks!  For anyone else experiencing this, I found the fix here

Profile