Closed (won't fix)
Project:
Node Auto Term [NAT]
Version:
6.x-1.1-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
24 Oct 2007 at 00:46 UTC
Updated:
10 Jun 2009 at 19:08 UTC
Hi. After reinstalling NAT and deleting nodes relations node - term are lost.
Definitely did setup of NAT module and sync of content -> vocabulary.
When clicking sitemap item "There are currently no posts in this category." message appears.
Website is simple and there's no views or other interfering modules used.
Browsing 'nat' table shows that the table contains PROPER nid/tid/vid rows.
Comments
Comment #1
ivrh commentedUnfortunately, I don't see anybody here trying to fix any of issues. All issues still are in 'unresolved' state.
Just following up my previous post.
I am using sitemap module and nat for showing sitemap page. NAT creates terms and deletes them as required, but existing and new pages don't have link between node and term, i.e. when I click on a term from one of NAT's created, it gives me empty page with the message above.
I edited my vocabulary and assigned it to 'page' content type. Since that I can enter terms manually and those pages are displayed correctrly when I click on the term. NAT creates another term and this term doesn't work.
In my opinion NAT isn't updating one of required tables, where node->term are stored. As I mentioned before, term_values and nat tables show proper values.
Comment #2
ivrh commentedHere's small patch to make it working.
It didn't update term_node table - that was the reason.
Starting at line 590:
Comment #3
anantagati commentedCode from #2 doesn't make sense for me. Associated term for node doesn't mean that node is under that term.
Comment #4
mlncn commented#2 also won't work-- whenever the node is edited, unless you've taken care to enable the vocabulary for it, the node will be deleted.
Comment #5
Zen commentedNo response; doesn't look like a bug.
Comment #6
Dracolyte commentedI'm using NAT and views in Drupal 6. I've mapped new nodes to forums with NAT, but using the NAT nid in views I've had exactly the same problem Ivan described.
I'm using the NAT nid as an argument, setting it to the default argument and setting that to Node ID from URL.
The problem is: The views query is looking for entries in the term_node table, but NAT isn't creating any. So I added lines similar to Ivan's above and they are working great.
Specifically, in _nat_save_association, this line will fix the problem for Drupal 6:
db_query("INSERT INTO {term_node} (nid, vid, tid) VALUES (%d, %d, %d)", $nid, $nid, $term['tid']);Hope this helps someone sometime!