Duplicate entries after 4.7 RC 3 update
hadishon - April 19, 2006 - 12:39
| Project: | Aggregator2 |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
After updating drupal to 4.7 rc3, everytime I run cron (which refreshes the feeds) I get:
Duplicate entry '369-563' for key 1 query: INSERT INTO term_node (nid, tid) VALUES (563, 369) in httpdocs/includes/database.mysql.inc on line 120.
The values change depending on the feed.
Anyone else experiencing this? Or know how to fix it?

#1
Upgrading to drupal CVS head seems to fix the problem.
#2
Well I thought it was fixed until aggregator2 syndicated more rss content and then I got these error messages again.
Is this a problem with aggregator2.module? I don't get these error messages any other time.
#3
I had the same problem It seems that for some reason, after the update, taxonomy vocabularies are not associated with feeds and items anymore.
To solve the problem, edit the feed and item vocabularies and associate them with the node types.
It worked for me.
#4
Sorry.
It was a false positive. Today after almost a week of it working fine. the errors started appearing again.
I'll look into it.
#5
I think i got the issue cornered, but i need some help to fix it.
The error is apearing on every item update. That is an item that already exists and is updated. An error apears for every taxonomy term associated with this item.
I think its got to do with the hook_update implementation not checking for revisions or smthg. Here's the code:
/*** Implementation of hook_update().
*/
function aggregator2_item_update($node) {
db_query("UPDATE {aggregator2_item} SET link = '%s', author = '%s', fid = %d WHERE nid = %d", $node->link, $node->author, $node->fid, $node->nid);
}
in the drupal api, the implementation of hook update, is different:
function node_example_update($node) {// if this is a new node or we're adding a new revision,
if ($node->revision) {
node_example_insert($node);
}
else {
db_query("UPDATE {node_example} SET color = '%s', quantity = %d WHERE vid = %d", $node->color, $node->quantity, $node->vid);
}
}
here's the revision page of the handbook: http://drupal.org/node/30030
#6
I think this should fix it.
#7
Applied patch and it resolves this issue
+1 to commiting upon further review
#8
Worked for me. +1 to commiting
#9
works for me
+1 for commiting
#10
Hi all, I have installed the "patch" and run the upgrade.php script on my copy of Drupal. Despite these efforts, i'm still getting the "duplicate entry" error message. Do I have to empty drupal's chache of module information? Please advise. --Peter
#11
I am getting the same error, but running Leech in 5.1.
I added two values to the News Feeds taxonomy field and it generated one message for each RSS article node that I had online.
It appears that both terms were added to the category list, but only the second term was added to the individual node tags.