i just upgraded from alpha2 and now i am receiving errors. it occured first when i tried to run update.php after the upgrade, it also occurs when i try to clear the cache. when running cron, i get the "Notice" only.

Notice: Undefined index: access administration menu in user_role_grant_permissions() (line 3041 of /home/user/public_html/modules/user/user.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => access administration menu [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3043 of /home/user/public_html/modules/user/user.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

j_ali’s picture

I get this too (started with alpha4, I believe). Looks like http://drupal.org/node/1063204. I got a little lost trying to follow what they were saying but it sounds as though the problem might be avoided if the OpenChurch dependencies could be tweaked (see eg., http://drupal.org/node/1063204#comment-6350638). I'm just using big words here, I've no idea what they mean!

linwiz’s picture

That is a step in the right direction but I don't know which module needs to be patched.

j_ali’s picture

You mean, using the patch in comment 32? That would be the features module. If you do try it, let us know if it works. Always happy to let someone else be guinnea pig!

linwiz’s picture

I will work on this when I get home this afternoon

linwiz’s picture

it doesnt appear that openchurch is using features. as there is no includes/features.user file

j_ali’s picture

I can navigate to /admin/structure/features which lists a number of features, so I suspect it is.

Note the file is called includes/features.user.inc and on the site I look after it's located at profiles/openchurch/modules/contrib/features/includes/features.user.inc

linwiz’s picture

I did not run patch, but instead i placed the lines in the features.user.inc file by hand and it appears to work. i can only assume the patches will do the same, but both #27 and #32 must be applied

j_ali’s picture

Glad that it's working for you, but I'm surprised that both patches need to be applied. #27 adds the call to drupal_static_reset() before the call to _user_features_get_permissions(), #32 adds the call to drupal_static_reset() inside _user_features_get_permissions() itself so I would have expected it to obsolete #27 (and that's what the comments appear to be implying also). Disclaimer: I'm not a PHP programmer.

linwiz’s picture

I made sure to remove #27 and left #32. problem seems solved, i must have put patch #27 in first, which apparently does not work.

so #27 is not needed, but #32 solved the issue.

the two patches affect two different functions. i tried after appling only one patch and still got the errors.

function user_permission_features_rebuild($module) {

and

function _user_features_get_permissions($by_role = TRUE) {

linwiz’s picture

Status: Active » Needs review
j_ali’s picture

Yup, I can confirm that the patch in comment #32 allows me to clear the caches.

I attach the patch that I used to OpenChurch to pull it in.

drupalninja99’s picture

I have pushed this change out to 1x dev

drupalninja99’s picture

So is the maintainer going to put this patch in the next release of features?

drupalninja99’s picture

Thanks for this patch, I think it will keep the user permissions part of features from busting if the module isn't enabled? That would be really good bc we have issues with some module like overlay & admin menu that we don't want to force as dependencies.

j_ali’s picture

Not sure who you are asking, but either way, I think you're going to need to ask on the features issue (http://drupal.org/node/1063204). The patch we're using was originally written by floretan, who might be able to answer.

drupalninja99’s picture

Pushed to 7.x-1.11-alpha8

linwiz’s picture

fixed in 7.x.1.11-beta1.

drupalninja99’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Jaycoke’s picture

Title: errors after upgrading from alpha2 » errors after upgrading from 7.x-1.11-beta6
Version: 7.x-1.11-alpha7 » 7.x-1.11-beta6
Status: Closed (fixed) » Needs work

I am still getting this error every time I run the update script, or try to open the modules tab. I have tried to apply the suggested patch and it does not work.
openchurch-7.x-1.11-beta6

Notice: Undefined index: access administration menu in user_role_grant_permissions() (line 3052 of /var/www/html/Public/modules/user/user.module).
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: INSERT INTO {role_permission} (rid, permission, module) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => access administration menu [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3054 of /var/www/html/Public/modules/user/user.module).

AllenConquest’s picture

I am also having the same problem with openchurch-7.x-1.11-beta6. During the update process it applied several updates and finally came back the with error mentioned above.

I'm new to Drupal, how do I start to debug this issue?

drupalninja99’s picture

Darn, I must have reintroduced this issue. What version were you upgrading from?

drupalninja99’s picture

I tested for a few versions back without issue. Can you give me the specific version you are updating from?

AllenConquest’s picture

I had just downloaded 7.x-1.11-beta6 from the website and copied it over the top of an older version, which I think was 7.1.2. Would it be better to delete the old version and reload it completely (keeping the settings.php)? I don't have anything special on the site and am starting from new, so I don't mind losing anything.

drupalninja99’s picture

Ya definitely delete everything but your sites folder. I will test some more tonight from 7.1.2

drupalninja99’s picture

I bet you need to disable toolbar before upgrading. I can test.

drupalninja99’s picture

Status: Needs work » Needs review

That is such an old version, it is likely a module that is disabled. I know that toolbar was retired in favor of the admin menu toolbar so that is my best guess at this time.

drupalninja99’s picture

Status: Needs review » Closed (works as designed)