During an aegir site install. The site install works, but the log is filled with these config_perms errors:

Trying to get property of non-object in config_perms_perms() (line 27 of /var/aegir/platforms/xforty-dev-v2011-07-25-13-11/sites/all/modules/contrib/config_perms/config_perms.module).
Invalid argument supplied for foreach() in config_perms_menu_alter() (line 118 of /var/aegir/platforms/xforty-dev-v2011-07-25-13-11/sites/all/modules/contrib/config_perms/config_perms.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dkingofpa’s picture

During install, Drupal may not have bootstrapped access to the database cache yet. So instead, it uses the stub class DrupalFakeCache defined in cache-install.inc. The cache_set function in DrupalFakeCache literally does nothing. As a result, cache_get won't return anything from the database because nothing was set. In those cases, I just use the rebuilt perms to avoid the invalid argument issue. Patch attached for 7.x-2.x

dkingofpa’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Active » Needs review
dkingofpa’s picture

FYI, the patch will also apply to the released 7.x-2.0 branch if you don't want to run dev in production.

Docc’s picture

Status: Needs review » Closed (fixed)

Good enough for me. Commited a fix based on your patch. Tnx.

barraponto’s picture

Posting the commit as a patch for drush make users.

Mohammed J. Razem’s picture

Status: Closed (fixed) » Needs review

Marking it as needs review for the new patch since the issue is reproduced and gets fixed with this patch.

barraponto’s picture

It doesn't need to be reviewed since it is already commited. I only posted it here because i didn't want to run a dev release.

barraponto’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)
bwood’s picture

I'm offering an additional patch in the child issue https://drupal.org/node/2200925 which fixes the same problem on cache clear.