We're working on an installation profile that incorporates a subtheme of Zen as the installation theme. On the very first installation page, before Drupal is installed and bootstrapped, we're getting a string of errors:

Notice: Trying to get property of non-object in user_access() (line 798 of /path/to/drupal/modules/user/user.module).
Notice: Trying to get property of non-object in user_access() (line 810 of /path/to/drupal/modules/user/user.module).
Notice: Trying to get property of non-object in user_access() (line 811 of /path/to/drupal/modules/user/user.module).
Notice: Trying to get property of non-object in user_access() (line 817 of /path/to/drupal/modules/user/user.module).
Notice: Trying to get property of non-object in user_access() (line 820 of /path/to/drupal/modules/user/user.module).

The errors appear to come from _zen_theme() because the permission 'administer site configuration' has not yet been defined.

Patch forthcoming...

Files: 

Comments

Status:Needs work» Needs review
StatusFileSize
new746 bytes

By checking if we're in the installation routine, we can prevent the rest of the code from being executed. The settings will get initiated automatically at the end of the installation routine.

ugh. patch isn't working for me :\

what's weird is that i do not have my subtheme set up as an install or maintenance theme. i am not sure why it's throwing this error message.

@liza - can you provide more context as to what's not working? Are you on a clean install? When do you first notice these errors?

Title:Notice: Trying to get property of non-object in user_access() when using Zen subtheme as installation theme.Fix PHP notice when using Zen subtheme as installation theme
Status:Needs review» Fixed

I've looked at this closely and it makes sense to turn off the registry warning for both install.php and update.php. So I simple check to !defined('MAINTENANCE_MODE') is sufficient.

Fixed! Thanks, Kai! http://drupalcode.org/project/zen.git/commitdiff/a8ecc42

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.