Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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...
Comment | File | Size | Author |
---|---|---|---|
#1 | zen-install-user-access-error-1991374-1.patch | 746 bytes | kaidjohnson |
Comments
Comment #1
kaidjohnson CreditAttribution: kaidjohnson commentedBy 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.
Comment #2
liza CreditAttribution: liza commentedugh. 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.
Comment #3
kaidjohnson CreditAttribution: kaidjohnson commented@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?
Comment #4
JohnAlbinI'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