I get the following error when I try to run update.php after installing the latest (7.x-3.5) version of the Flag module. I have reviewed the issue queue, and though I saw some that were similar, they were closed due to lack of sufficient detail. This is in my local environment, so I can't send a link. Any ideas? Please let me know if you need more information. Thank you...

Update #7305
•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] => 2 [:db_insert_placeholder_1] => flag bookmarks [:db_insert_placeholder_2] => ) in user_role_grant_permissions() (line 3109 of C:\xampp\htdocs\target-center\modules\user\user.module).

Comments

joachim’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Category: Support request » Bug report

It looks like this is caused by the Bookmarks flag getting moved into a separate submodule.

marysalome’s picture

Thanks, Joachim.

joachim’s picture

Hmmm weird. It's not defined in the default hook, rather it's created in the database when the module is enabled.

So actually, upgrading from 2.x to 3.x shouldn't affect that.

marysalome’s picture

Is it worth me removing the module altogether and starting from scratch?

joachim’s picture

There's two ways you can attack this:

a) create a new dev site from scratch with just core and Flag 2.x, set the same flag permissions, and try to upgrade that to 3.x to reproduce the problem
b) try running the update again on another dev copy of your site, and this time chuck in debug statements to try and catch the problem

marysalome’s picture

OK, thanks! I'll report back.

marysalome’s picture

I went with option a and don't get that error on a brand new dev site (all it had was core modules to start with). The only report I got after the upgrade was normal:

"Flag roles have been converted to user permissions. Permissions have been granted to each flag based on flag roles. You should review the consequences of this in the change record."

So it seems like the next step would be to do option b, and see what I find out.

westis’s picture

@marysalome: Did you find a solution to this?