Drupal 6 version: version = "6.x-2.0-beta1"
Drupal 7 version: version = "7.x-1.0-rc2"
Ran upgrade php in D7 with no modules (ran with no pending update success) then installed the modules and ran again.

Update #7001
Failed: 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] => 4 [:db_insert_placeholder_1] => administer menu attributes [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3034 of /home/trunk-7/modules/user/user.module).

Code that is not running:

 * Grant the 'administer menu attributes' permission to roles that currently
 * have the 'administer menu' permission.
function menu_attributes_update_7001() {
  $roles = user_roles(FALSE, 'administer menu');
  foreach ($roles as $rid => $role) {
    user_role_grant_permissions($rid, array('administer menu attributes'));

  return t("Every role with the 'administer menu' permission has also received the 'administer menu attributes' permission.");

Anybody else having issues with this part of the upgrade?


jeremyr’s picture

Having this exact problem today on D7.

jeremyr’s picture

It seems that the module "Menu Attributes" was not enabled. So I turned it on and the update ran just fine. For what it's worth....

Screenack’s picture

For the record, this isn't limited to D6 -> D7 updates. I just experienced it upgrading from 7.x-1.0-rc1 to rc2.

Yes, my module was disabled. Enabling the module enabled the update. Jeremyr saved me a whole lot of head scratching; thanks!

jeremyr’s picture

Glad I helped you out. We updated a number of D7 sites today and only one out of +/-50 had this issue.

amateescu’s picture

Status: Active » Fixed

Hm.. so this is fixed then?

Screenack’s picture

amateescu: what data are you using to change this status to "fixed"?

amateescu’s picture

Comments #2 and #3.

Screenack’s picture

Status: Fixed » Active

This thread indicates that we have a work-around, not a solution. Unless we expect disabled modules to throw errors? I've set this back to active.

amateescu’s picture

Ok, as you wish :)

cmsdave’s picture

Had the same issue. In my case, it was also because the module was off. Turning it back on resolved the issue.

I agree with screenack's point that I wouldn't have expected to see this error given that the module was disabled.

VM’s picture

Status: Active » Fixed

I think the problem is a documentation issue at this point. If modules are disabled the code to update them can't run when needed. There are core discussions on this and ultimately, the instructions to disable modules before updating them may currently be a misleading and unneeded step.

VM’s picture

Status: Fixed » Active

didn't mean to switch status.

Kasper Souren’s picture

Same issue on 2 sites. Enabling the module and then running the upgrade fixed it.

manoloka’s picture

I can confirm that 2# solved it for me too

morphosis7’s picture

Same thing here - ran into error, found this thread, enabled the module, and now the update worked.

In lieu of changes to the overall upgrade instructions, could an UPGRADE.txt or README.txt file be put within this module to advise others of this issue and the workaround? Or at least a pointer to this thread? From what I've seen (for example at https://drupal.org/node/948216 ) that's the way site owners are advised to check for the needs of a given module that may vary from what is expeted.

I'd be happy to write something such as what I'm suggesting, if the module maintainers think it would be a good idea.

gaurav.goyal’s picture

#2 worked for me too. thanks jeremyr..:)

gurunathan’s picture

Issue summary: View changes

#2 worked for me

joelpittet’s picture

Status: Active » Fixed

I'm marking this as fixed from the last set of comments. Let me know if the steps to reproduce still cause this upgrade error.

Status: Fixed » Closed (fixed)

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

localnetwork’s picture

#2 worked for me.