Error in adding new class members

harrietech
Forums
Hello, I cannot add users to a class - trying to do so leads to an 'unexpected error' page, and the error log says: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '112-112-og_access:node' for key 'PRIMARY': INSERT INTO {node_access} (nid, realm, gid, grant_view, grant_update, grant_delete) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5), (:db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11), (:db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17); Array ( [:db_insert_placeholder_0] => 112 [:db_insert_placeholder_1] => content_access_rid [:db_insert_placeholder_2] => 3 [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 112 [:db_insert_placeholder_7] => og_access:node [:db_insert_placeholder_8] => 112 [:db_insert_placeholder_9] => 1 [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 0 [:db_insert_placeholder_12] => 112 [:db_insert_placeholder_13] => og_access:node [:db_insert_placeholder_14] => 112 [:db_insert_placeholder_15] => 1 [:db_insert_placeholder_16] => 0 [:db_insert_placeholder_17] => 0 ) in node_access_write_grants() (line 3546 of /srv/bindings/56ffcc1189d741cba719f6c6cef2f1bb/code/modules/node/node.module). I'd be extremely grateful for your help. Thanks, Harriet
Profile picture for user James Aparicio
James Aparicio

Hi harrietech,

Hi harrietech,

This is strange, since when did this start happening? Try rebuilding the permissions at admin/reports/status/rebuild

What version of opigno core are you using? You did not activate the module Organic Groups access control did you?

Best regards

harrietech

HI James,

HI James, Thanks for your reply. I did activate the ACL and Content access modules, because I wanted to give individual 'coaches' permission to edit the class landing page body for their class. I've tried uninstalling those modules, as it did seem as though that had triggered the problem, but the modules are still showing, despite my having uninstalled them. Do you think that rebuilding the permissions will help, given the problem's cause? Much appreciate your advice on this. Harriet
Profile picture for user James Aparicio
James Aparicio

Hi harrietech.

Hi harrietech.

The only module that you cannot activate is Organic Groups access control  because we have our own Opigno og access control module. There is a warning to not activate it.

What do you mean the modules are still showing despite having uninstalled them?

Best regards

harrietech

Hi James,

Hi James, I have not installed that module, so I tried to rebuild the permissions in the way you describe. However, the following error message showed up: An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=40&op=do StatusText: Internal Server Error ResponseText: Another strange error message that shows up in the log is: Configuration file Not protected The file sites/default/settings.php does not exist. Please add one to your site codebase by copying default.settings.php to settings.php. Could the problems be connected? Thanks, Harriet
Profile picture for user James Aparicio
James Aparicio

Hi harrietech,

Hi harrietech,

No, i dont think they they are related.

The settings.php file should only be readable only for the webserver user after installation.

Best regards

rfrobenius

Same error different reason

FYI I got the same error when trying to update a user. However, this was because I was trying to assign the "student" role to a user that was "pending". Changing the user to "active" made the error go away. Although it makes sense that a pending user would not be able to get roles assigned, it would be good for the UI to check for that condition and present a dialog rather than crashing. By the way I wasn't actually trying to assign a role to a pending user, I just neglected to change the status to active before assigning roles. Hope this helps someone save some time tracking what happened.