Error message every time a discussion is started

tobiberlin - August 17, 2009 - 16:29
Project:Discuss This!
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

everytime a discussion is started from a node by the discuss this link the user is directed to the forum and a new topic/ thread/ forum node is generated. But the following error message appears:

user warning: Duplicate entry '264-403' for key 1 query: INSERT INTO term_node (nid, vid, tid) VALUES (386, 403, 264) in /srv/www/vhosts/diaet-clique.de/subdomains/dev/httpdocs/modules/taxonomy/taxonomy.module on line 698.

Greez,
Tobias

#1

AlexisWilke - August 17, 2009 - 16:36

Is term number 264 the one referencing your forum?

What do you see when you go to:

taxonomy/term/264

Thank you.
Alexis Wilke

#2

tobiberlin - August 18, 2009 - 12:37

Ok, I had deactivated this module and in order to test it again reinstalled it. Now the error message appears with the following term id:

user warning: Duplicate entry '272-420' for key 1 query: INSERT INTO term_node (nid, vid, tid) VALUES (403, 420, 272) in /srv/www/vhosts/diaet-clique.de/subdomains/dev/httpdocs/modules/taxonomy/taxonomy.module on line 698.

With "taxonomy/term/272" I come to the forum I created for this kind of discussions. Better: all forum nodes created in this forum/ with this term are listed. Does it help you???

#3

AlexisWilke - September 8, 2009 - 18:56

Okay...

I'm not too sure why you get that error and not others (although others may just not have reported the problem... 8-) )

Now, I can see that the function creating a new topic will:

1. Create the forum node

2. Load the forum node

3. Tweak the taxonomy of the new forum node (i.e. setup the term that generate that error...)

4. Save the forum node

You get that error in point (4), I'm pretty sure. But somehow the node is already linked to the term defined for that forum which I think makes sense, but I don't see why it happens...

The Taxonomy save function is supposed to delete the terms first, then save them back in.

The one thing that can happen, and that's probably the problem you're running into, is *another* module adding the term in a different format. The taxonomy accepts terms as arrays, objects or as is. So you probably have a module that generates such an interaction. We'd need to determine which one that is to help me fix the bug.

Thank you.
Alexis Wilke

#4

tobiberlin - August 21, 2009 - 15:21

Wow, this will be a big task as I use many modules... give me some time and I will check each module.

#5

AlexisWilke - August 21, 2009 - 16:05

You may want to start with those that you know work on taxonomies in some way...

#6

tobiberlin - September 8, 2009 - 17:29

Just to give you a short update that I have been on my holidays for a few days (unfortunately not enough!!!) and that I just checked every module that depends on taxonomy but nothing changed. So during the next days I will check all the other modules.

#7

Reserve - September 29, 2009 - 21:25

I have the same problem:

user warning: Duplicate entry '29-24' for key 1 query: INSERT INTO drupal_term_node (nid, vid, tid) VALUES (24, 24, 29) in /home/bfsk/public_html/devel/drupal/modules/taxonomy/taxonomy.module on line 698.

when i go to taxonomy/term/24, i get at page not found.
but for taxonomy/term/29 i get a content of the forum the thread should be created

#8

Reserve - September 30, 2009 - 08:13

I have tested a bit more. I can choose from a list which taxonomy term i want to assosiate with the node.
So there for i tried disabling assosiating terms with node, but this did not work. (Still error)

#9

AlexisWilke - September 30, 2009 - 08:19

Reserve,

Okay... is that taxonomy linked with the Forum node type?

I thought I had a taxonomy linked with all my forums (for my Site index) so I should have had the same error...

It could also be the setup of that taxonomy that plays a role to the problem. Can you give us a screenshot of that taxonomy setup?

Thank you.
Alexis

#10

AlexisWilke - November 19, 2009 - 20:21

Just wondering... is the newest development version still not working? It is quite different from the old version that would do something twice with the taxonomy... now it is done just once and the error should not appear.

Thank you.
Alexis Wilke

 
 

Drupal is a registered trademark of Dries Buytaert.