The title pretty much covers it - tried to upgrade to the newly released Beta1, can't update databse as running updatedb results in "SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chefnelone’s picture

Same problem here. I get this message when running database updates

The following updates returned messages

entity_translation module

Update #7002
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] => 3 [:db_insert_placeholder_1] => edit node original values [:db_insert_placeholder_2] => ) en user_role_grant_permissions() (línea 3043 de /Applications/MAMP/htdocs/mysite-1.com/modules/user/user.module).
garrettc’s picture

I'm seeing the same thing when trying to update from 7.x-1.0-alpha2 to 7.x-1.0-beta1 with both drush updb and /update.php.

  • Drupal 7.16
  • PHP 5.3.17
  • MySQL 5.1.38
plach’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
460 bytes

wft, let's try this one :(

Apply the patch and run the updates, you should be ok then.

Georgique’s picture

@plach Applied patch, updated successfully. Let's wait several more reviews.

garrettc’s picture

Patch applied cleanly and the updates ran (7002 - 7004), but when trying to load the site it white-screened.

Watchdog had the following error:

Exception: Cannot initialize entity translation path variables (invalid path scheme). in EntityTranslationDefaultHandler->initPathVariables() (line 1401 of /Users/garrettc/Work/sandbox/wdcs/sites/all/modules/I18n/entity_translation/includes/translation.handler.inc).

Clearing the cache failed with the same error. I rolled back to a previous version of the database that hadn't been touched by the pre-patched beta1 upgrade and it all updated okay. Perhaps some cruft got left in the database by the failed update? Something to watch out for anyway.

Site is back and the new UI work looks great.

plach’s picture

Status: Needs review » Fixed

Ok, I committed #3, a -dev snapshot will be out in some hours. You can safely use that one instead of beta1.

Feel free to reopen this if it does not work for you. I'll roll a new beta soon, but I'd like to wait and see whether new bad bugs come up so I'll wait for a while.

Vito Andolini’s picture

Just a note that I went from alpha2 to beta 1 (10 minutes ago) and get this error:

Exception: Cannot initialize entity translation path variables (invalid path scheme). in EntityTranslationDefaultHandler->initPathVariables() (line 1401 of /xxxxxxxxx/docroot/sites/all/modules/entity_translation/includes/translation.handler.inc).

Vito Andolini’s picture

I also tried the current 7.x-1.x-dev and got the same error.

plach’s picture

Does clearing caches fix it?

pyry’s picture

Drush cc all and drupal_static_reset() neither helped. Didnt try the patch.

plach’s picture

Guys if you are talking about the error in #7, please open a new issue. This is a mess right now.

albert.aribaud’s picture

Patch from #3 also fixed issue for me. Thanks plach!

pyry’s picture

- Disabled and deleted alpha2
- Downloaded and enabled latest dev
Seems to work with small testing and the errors are gone.

Vito Andolini’s picture

-Installed latest dev
-Cleared Cache
Seems to be working again. Thanks for the help.

astutonet’s picture

I'm using the dev version and I am too having this issue.

The patch in #3 solves the question.

Tks.

ianthomas_uk’s picture

jdflorez’s picture

I can confirm #3 worked for me (using alpha).

Thanks

FreeFox’s picture

Deleted alpha1 directory from /all/modules
drush dl entity_translation
drush updb

All ok so I think its a leftover of alpha1 that breaks beta1

Cheers

jalves’s picture

Installing the last dev version solved my problem.

plach’s picture

Committed this follow-up: the quick fix above turned on workflow permissions by default, which is not what we want.

Mac_Weber’s picture

Any chances this fix gets soon applied to a stable version?

Right now the latest stable version is unusable without this patch.

plach’s picture

Right now the latest stable version is unusable without this patch.

This is completely false, every new site can happily use beta1 :)
Moreover a new stable version would be more or less the current dev.

Mac_Weber’s picture

@plach I tried to install ET in a clean Drupal and I got this error. I had opened issue #1842178: Errors after enabling module for the very first time before finding this one.

When I said it was unusable is because beta1 is not being installed in a clean install.

plach’s picture

You are right, sorry, I didn't realize this happens also on clean installations. I guess we need a new beta asap, then.

leonevers’s picture

I get the same problem than posted initially by chefnelone. After a little debugging it seems to happens in the install file, in line 133 - 136. The permissions "edit [entity_type] original values" and "edit [entity_type] translation shared fields" is not known by the system yet (in the case of a new install), because it will be established in the hook_permission later on when the module file is called.
If someone can confirm this this observation, I would try to bring up a little patch for that.

leonevers’s picture

This patch avoided the PDOException while enable/install the module at my host. Please try if it works for You.

plach’s picture

This issue is already fixed in the latest dev...

leonevers’s picture

You are right, thanks.

plach’s picture

Beta2 is out :)

Mac_Weber’s picture

plach thanks for that.
You have been doing a great job!

Status: Fixed » Closed (fixed)

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

  • Commit 893aef4 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1829980 by plach | Stan Shevchuk: Fixed Upgrade to Beta1 results...
  • Commit d61f0b2 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1829980 by plach: Ensure workflow permissions are disabled by...
  • Commit 8659d77 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1829980: Fixed typo.
    

  • Commit 893aef4 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1829980 by plach | Stan Shevchuk: Fixed Upgrade to Beta1 results...
  • Commit d61f0b2 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1829980 by plach: Ensure workflow permissions are disabled by...
  • Commit 8659d77 on 7.x-1.x, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1829980: Fixed typo.
    

The last submitted patch, 3: et-beta1_upgrade-1829980-3.patch, failed testing.