I have been tweaking the webform code quite a bit for a standalone site (branching is intended).
However, after adding a new form, just when it is redirected to edit/components, I get this kind of warning:
user warning: Duplicate entry '15-1' for key 1 query: INSERT INTO webform_roles (nid, rid) VALUES (15, 1) in /home/MYDOMAIN/sites/all/modules/webform/webform.module on line 502.
The command on line 502 is:
db_query('INSERT INTO {webform_roles} (nid, rid) VALUES (%d, %d)', $node->nid, $rid);
Where the full context is:
// Set the per-role submission access control.
foreach (array_filter($node->webform['roles']) as $rid) {
db_query('INSERT INTO {webform_roles} (nid, rid) VALUES (%d, %d)', $node->nid, $rid);
inside the implementation of hook_insert()
Still, when checking in the database webform_roles table, there is NO record where nid is 15 and rid is 1 (the last record is (14,1).
If I ignore the warning - nothing actually seems to be wrong and everything is working OK.
Please note that I did not post is as an issue for the said module because of my so-called "tweaks" which may have caused this.
could anyone please advise on this?
Thanks!
Comments
same problem here
I am having the same problem. Any help is appreciated.