Basic D6 installation upgraded to latest D7-dev snapshot. Non error messages during the upgrade process but when I try to change any settings in admin/people/permissions I get this fatale error:
PDOException:
SQLSTATE[23000]:
Integrity constraint violation: 1062 Duplicate entry
'3-administer contact forms' for key 'PRIMARY':
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]
=> administer contact forms [:db_insert_placeholder_2]
=> contact
)
in user_role_grant_permissions() (line 2875 of drupal/modules/user/user.module
Have taken the liberty to reformat the error message to improve readability. Pls let me know if you would rather like the untouched version. The upgrade script rapported this:
Update #7007
* Inserted into {role_permission} the permissions for role ID 1, Inserted into {role_permission} the permissions for role ID 2, Inserted into {role_permission} the permissions for role ID 3
Could the problem be related to system_update_7007? Rebuilding the permissions from admin did not fix it either.
Tagging this as critical instead as major then this is pretty hard to use the site without a proper user role system though it looks like the security is still is maintained.
Comment | File | Size | Author |
---|---|---|---|
#4 | 875744_user_grant_perms_primary_key_in_merge_array.patch | 423 bytes | JacobSingh |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein commentedI think this is related to #607238: Permissions are assumed to be unique among modules, but uniqueness is not enforced, especially the last set of comments after the issue was reopened. I agree it is a critical bug.
Comment #2
JacobSingh CreditAttribution: JacobSingh commentedIndeed, this is bad. The module field should not be part of the primary keys.
I'll roll a patch
Comment #3
David_Rothstein CreditAttribution: David_Rothstein commentedI believe there is already a patch being discussed at the issue I linked to. Maybe this is a duplicate (although that other issue is not titled in a way that anyone with this problem will ever find it).
Comment #4
JacobSingh CreditAttribution: JacobSingh commentedComment #5
JacobSingh CreditAttribution: JacobSingh commentedComment #6
moshe weitzman CreditAttribution: moshe weitzman commentedI agree that this is a dupe. Join us over there.