By Tom-182 on
Hello, I'm using Drupal 5.1 right now. Since couple of days ago one of my client's site is giving these error message every time he updated or created new nodes on his site.
* user warning: Unknown column 'term_data.tid' in 'where clause' query: SELECT COUNT(*) FROM ap_term_data WHERE (term_data.tid IS NULL) in /home/agatapro/public_html/includes/database.mysql.inc on line 172.
* user warning: Unknown column 'term_data.tid' in 'where clause' query: SELECT COUNT(*) FROM ap_term_data WHERE (term_data.tid IS NULL) in /home/agatapro/public_html/includes/database.mysql.inc on line 172
Is it because one of the modules he used? Because this error never happened before. I've search through Google and didn't found any solution.
Hope someone could help me or give me a clue of whats happening.
Thank you.
Comments
Probably a contributed
Probably a contributed module.
From what I can see, there is an "ap_" database prefix (ap_term_data) which is not used later on in the query (in term_data.tid). Some module somewhere in there is using "term_data.tid IS NULL" instead of "{term_data}.tid IS NULL". The mustache would bring the prefix in.
I would go to that Drupal installation and try
grep -r ".tid IS NULL" .to locate the culprit. (Don't look directly for term_data.tid because that may be coming from a variable.)