Closed (duplicate)
Project:
Custom Permissions
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2011 at 00:31 UTC
Updated:
27 Sep 2014 at 16:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jibize commentedHi there,
I'm having the same issue...
Comment #2
askibinski commentedsub
Comment #3
jason.fisher commentedSame issue in 6.x .. this is blocking Aegir.
Comment #4
Anonymous (not verified) commentedAlso having this problem, I did a little debugging. Because I'm not familair with creating patches as recommended I describe the solution in the simple way.
In config_perms/config_perms.module change the function 'function config_perms_perms()' in:
function config_perms_perms($machine_name = NULL, $rebuild = FALSE) {
// Load current perms
// $perms = cache_get('config_perms');
// Rebuild if not there
// if (!$perms || $rebuild) {
$perms = config_perms_cache_rebuild();
// }
return ($machine_name) ? $perms[$machine_name] : $perms;
}
I'm not familair with the function 'cache_get' but I suppose that this function call is the cause of the problem. By unconditionally calling config_perms_cache_rebuild() this problem is circumvented. There must be a better solution but this one works, not unimportant!
Comment #5
richard.wyke commentedI think this is because of the way cache_get returns data as an object which config_perms_menu_alter isn't expecting, a fix here to get from the cache properly:
Change:
Comment #6
jonhattanSolution in #5 just works.
Attached a patch implementing #5.
Comment #7
3rdLOF commentedLast Patch did it.
Many thanks
Comment #8
anniegreens commentedAttached patch re-rolled with correct Drupal standard file permissions (644).
Comment #9
dkingofpa commentedPatch in #8 fixed my issue. I wasn't getting the exact same error message, but it was on the same line and this patch worked.
Comment #10
jonhattanComment #11
Leeteq commentedTime to push this one to the -dev branch?
Comment #12
rooby commentedWorks for me too and the patch looks good. +1 for RTBC
Comment #13
barraponto+1 for RTBC.Not working for me on a Panopoly install. Yet works fine on simplytest.me.Comment #14
barrapontoBTW, this patch depends on the fix commited in #1229198: Invalid argument supplied for foreach() - config_perms.module
Comment #15
drupov commentedPatch from #8 works against the latest dev.
Comment #16
druplr commented#8 Fixed the the following error on admin/people with 7.x-2.0+4-dev.
Notice: Trying to get property of non-object in config_perms_permission() (line 55 of .../modules/o_contrib_seven/config_perms/config_perms.module).+1 for RTBC
Comment #17
tanmayk#8 works against latest dev.
+1 for RTBC
Comment #18
mlncn commentedThis is also a duplicate of #2200925: On cache clear: Invalid argument supplied for foreach() - config_perms.module (though i didn't realize until i went to apply it).
Unless i'm missing something?