Posted by Shane Birley on August 3, 2007 at 8:12pm
Jump to:
| Project: | Conference |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I just got this error and am not sure why. Everything has been going well until I edited the presentation/paper content type to add a few more fields. This appeared right after I created the first paper.
user warning: Duplicate entry '27-8-conference' for key 1 query: INSERT INTO conf2_node_access (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES ( 27, 8, 'conference', 1, 1, 1), ( 27, 1, 'conference_manage', 1, 0, 0) in /home/drupal_5x_prd_01/includes/database.mysql.inc on line 172.
Comments
#1
I will do more testing and see if I can replicate. Let me know if you require any other information.
#2
Damn. I think this is because I forgot to update the conference permissions.
#3
I see the nid but it looks fine in all related tables (sequences, etc).
#4
on one hand, I'm currently travelling and have very limited possibilities to do anything regarding this.
on the other hand, editing the content type by adding more fields while the conference module is already "active" is of course something quite unexpected and I'm not surprised this might lead to errors (although I would not assert that it MUST leas to an error and actually can't see at once why).
If we find out what exactly happened, maybe we should add a warning in the README file or in the help text, but once again, I probably won't be able to contribute to a solution until September.
(If the error is continuing to prevent you from using the module and it is urgent for you to fix it you might try to simply delete the problematic node.)
Maybe, as a future enhancement, we could add a "check and repair corrupt database" feature...
#5
It may be an idea for something like a "rebuild broken permissions" or something like that. OR, it may be better solution that, if a content type is updated, the permissions are updated automatically or a note is displayed telling the user that they need to update immediately upon editing a content type.
I am going to rebuild the site and see if I can replicate the problem. It was very unexpected, especially, with it being a sequence issue (at least, it appears that way). I will update with any notable findings I get.
#6
I agree that a "rebuild broken permissions" function would be a nice thing and if you have a suggestion for the code you're welcome.
However, supposing that "unexpected changes" as done in your case would not happen, would this trouble still occur?
Or can we change this issue to something else than an "active bug" ? (e.g. to a feature request ?)