OS: Linux opendistro, kernel: v2.6.39.2
Database: mysql 5.1.39
apache: 2.2.15
PHP 5.2.9
PHP error_reporting = E_ALL & ~E_NOTICE
Drupal 6.22
We're using term_node_count for taxonomy terms with a content profile (is a content type with taxonomy term fields) associated with each user. One example of the taxonomy terms used are the user's neighborhood. When saving the content profile, an error message is logged when going from some number of terms and resaving with zero terms.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT parent FROM term_hierarchy WHERE parent != 0 AND tid IN (109,) in /Applications/MAMP/htdocs/drupal/sites/all/modules/term_node_count/term_node_count.module on line 127.
Repeatable: Always
Steps to repeat:
Save content profile with multiple terms.
Edit content profile and turn off all taxonomy terms.
Resave.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | term_node_count-1239428.patch | 1.02 KB | gorbeia |
| #1 | term_node_count.patch | 1.24 KB | freebug |
Comments
Comment #1
freebug commentedThe problem arises when there is a multiple select taxonomy vocabulary.
If the "None" for this vocabulary is selected and no other taxonomy terms from the same vocabulary or another vocabulary is selected for a particular node.
The attached patch might solve this problem.
Comment #2
johne commentedThanks for the patch to try, but I keep getting errors trying to apply it. I'm using patch v2.5.8 on my mac, but get the same errors trying this on our linux server. patch doesn't seem to like the lines that mention a newline
But, I still get that error if I use the -u option for unified format. If I remove the newline lines I get:
Comment #3
johne commentedI also tried using git to apply this patch.
This is on a version I just got using git, so I don't understand the error. It looks more like this patch is also incompatible with git.
Comment #4
gorbeia commentedI have not tested if the patch fixes the issue, but I have applied it manually and generated a new patch using git.
Comment #4.0
gorbeia commentedupdated description with repeatability steps