A user of my project got the following error message and I cannot understand why it appeared - the mentioned nodes has nothing to do whith each other...
* user warning: Duplicate entry '673' for key 1 query: INSERT INTO xmlsitemap_taxonomy (tid, vid, changed, previously_changed, priority_override) VALUES (673, 15, 1258049525, 0, -2) in /srv/www/vhosts/my-site.de/httpdocs/includes/common.inc on line 3468.
* user warning: Duplicate entry '739' for key 1 query: INSERT INTO xmlsitemap_node (nid, changed, previously_changed, comment_ratio, priority_override) VALUES (739, 1258049526, 1258049526, 0, -2) in /srv/www/vhosts/my-site.de/httpdocs/includes/common.inc on line 3468.
Has anyone an idea? the last mentioned node is the node the user just saved when this message appeared.
Greez,
Tobias
Comments
Comment #1
Anonymous (not verified) commentedMy best guess here is that perhaps we're not using drupal_write_record correctly. Dave can you check it, please? I should have more time in Dec.
Comment #2
dave reidI didn't see anything that looked bad or out of place on initial review.
Comment #3
mrfelton commentedsubscribe
Comment #4
Starminder commentedsubscribe
Comment #5
spangaroo commentedI'm also receiving the same error. For me it shows up upon successful creation of a new node.
user warning: Duplicate entry '5867' for key 1 query: INSERT INTO xmlsitemap_node (nid, changed, previously_changed, comment_ratio, priority_override) VALUES (5867, 1260261548, 1260261545, 0, -2) in /public_html/includes/common.inc on line 3468.When I update the node to promote it to my front page using Workflow, there is no error.
Using 6.x-1.1 of xmlsitemap module.
Comment #6
Anonymous (not verified) commentedBased on #5 this appears more a bug in Drupal core than here. It could be possible that the hook is called more than once during the node creation and that the first insert has the row or table locked and the update fails on the second call and then drupal_write_record will attempt an insert causing this error. Is there a workable method for this with operation parameters?
Comment #7
spangaroo commentedIf there's anything I can do to help, please let me know. I don't know PHP very well but can help with testing and reporting back if there are any errors.
Comment #8
dankohn commentedI'm getting a couple hundred of these every hour with cron. And, I just uninstalled completely, confirmed that xmlsitemap, xmlsitemap_node, and xmlsitemap_taxonomy had been removed, deleted files/xmlsitemap directory, and then reinstalled.
Separately, I just deleted the sitemap cache from tools after seeing this error, but then got it again on the next cron.
I'm happy to give a maintainer admin access to my site if it would help you diagnose the issue.
Duplicate entry '2878' for key 1 query: INSERT INTO xmlsitemap_node (nid, changed, previously_changed, comment_ratio, priority_override) VALUES (2878, 1259905994, 1225315771, 0, -2) in /var/www/autism.healingthresholds.com/includes/common.inc on line 3468.
Duplicate entry '2877' for key 1 query: INSERT INTO xmlsitemap_node (nid, changed, previously_changed, comment_ratio, priority_override) VALUES (2877, 1259905994, 1225296682, 0, -2) in /var/www/autism.healingthresholds.com/includes/common.inc on line 3468.
Comment #9
alextronic commentedI also get this error.
Maybe it's because I created this module implementing hook_nodeapi??? But my module does not affect node tables. hmmmm
Alex
Comment #10
Anonymous (not verified) commentedThis is happening in the 2.x version as well and has a separate ticket for it.
Comment #11
Stephen Scholtz commentedsubscribe
Comment #12
dave reid@earnie: Not sure which 2.x ticket you're referring to. We haven't really had this problem reported in that version.
Comment #13
dave reidI might have been able to duplicate this when using devel_generate to make test nodes. I'll report back on what I find and if I've fixed it.
Comment #14
nirad commentedsubscribing
been using the module for a couple of weeks and just got this for the first time:
Comment #15
dave reidI can't duplicate this anymore. I'll need to have exact conditions as to when this error occurs in order to help fix it.
Comment #16
omegas7 commentedSubscribing. My error is a bit different, but yeah, it is related to the Taxonomy thingy.
Comment #17
dave reidComment #18
lewcpe commentedI confirmed this bug has something related to the workflow module and it triggers Drupal to call nodeapi/insert for two times as earnie mentioned.
I fixed this bug on my site by check if the record exist in nodeapi/insert as in nodeapi/update.
Comment #19
nyl_auster commentedwe had this issue to, for the reasons mentionned by lewcpe.
It seems to happen only if you put the action "save post" in a workflow in a "creation" trigger (that's to say, when you fire a node_save when a node is created; through the IU of workflow, using drupal actions.)
I suppose that in this case nodeapi "insert" is maybe called two times so xmlsite_map try two times to insert a new entry, and the second time fails every time.
I hope this can help.
Comment #20
sp_key commentedI receive exactly the same error and I'm not using the workflow module.
user warning: Duplicate entry '179-taxonomy_ter' for key 1 query: INSERT INTO xmlsitemap (id, type, subtype, loc, language, access, status, status_override, lastmod, priority, priority_override, changefreq, changecount) VALUES (179, 'taxonomy_term', '23', 'taxonomy/term/179', '', 1, 1, 0, 0, 0.5, 0, 0, 0) in /home/mysite/public_html/sites/all/modules/xmlsitemap/xmlsitemap.inc on line 137.
Comment #21
bedlamsubscribe
Comment #22
smoothk commentedsubscribe
Comment #23
sp_key commentedAny update anyone?
I now get hundreds of these errors every single time I run cron
Comment #24
hanno commentedsubscribe (not using workflow)
Comment #25
sp_key commentedAny updates?
It seems it's buggy. Still hundreds of errors every time I run cron.