I get the Warning for every time i display a view. So for example i have Dashboard module enabled on homepage displaying 5 different views in it, when i load the page i get 5 warnings of the kind:
* user warning: Unknown table 'n' in where clause query: SELECT count(*) FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid WHERE ((n.type <> 'content-event')) AND (term_node.tid IN ('57','58','59')) AND (node.status = '1') AND (node.promote = '1') in /home/mysite/public_html/drupal/includes/database.mysql.inc on line 120.
* user warning: Unknown table 'n' in where clause query: SELECT node.nid FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_data term_data ON term_node.tid = term_data.tid LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid WHERE ((n.type <> 'content-event')) AND (term_node.tid IN ('57','58','59')) AND (node.status = '1') AND (node.promote = '1') ORDER BY term_data.weight DESC, term_data.name DESC, node.changed DESC, node_counter.totalcount DESC LIMIT 0, 10 in /home/mysite/public_html/drupal/includes/database.mysql.inc on line 120.
Just updated to last cvs Views of today (13th july), Drupal 4.7.2.
Other relevant modules enabled: Category, CCK
Any help apreciated!
cheers
Comments
Comment #1
marcoBauli commentedComment #2
marcoBauli commentedok, tryed disabling all contrib modules except Views and the warnings are still there.
When disabling Views they disappear and get replaced by the following other warning:
warnings appear almost on every page.
Comment #3
marcoBauli commentednow disabled ALL modules (except the required ones of course), but cannot get rid of the above warning #2 on /admin/modules page...weird..
should this problem be addressed to Drupal core at this point?
PS: my node types where created with an early version of CCK and then updated, but now CCK, Category, everything is disabled...i'm really lost now
Comment #4
moshe weitzman commentedall modules are active on the admin/modules page. to get rid of errors there, you have to rename your .module files.
Comment #5
moshe weitzman commentedall modules are active on the admin/modules page. to get rid of errors there, you have to rename your .module files.
Comment #6
marcoBauli commentedok, about #2 above, i had to completely cancel a "bad" view to eliminate the warning (it was showing even if Views module was disabled..eek!)
Now:
re-enabling Views i get back to the initial Warning above, and actually i get a different 'Unknown table 'n'' for each of my views (see screenshot attached).
Notes:
setting this to critical since it's throwing loads of errors and the views are not displayed at all.
Comment #7
merlinofchaos commentedTry going to each of your views and resaving them. The query is often cached on the view, and some of the earlier Views updates can break with that caching unfortunately.
Comment #8
marcoBauli commentedyes, caching can be a pain when testing (test-cleanbrowsercache-cleandrupalcache-retest-....): where is the "caching switch-off" button?! ;)
Anyway i found:
the cause of the problem is the CCK Full-CRUD patch of content.module.
Overwriting it with the regular cvs file all the Warnings disappear and the views got back to life!
(well, almost all, one is still giving problems but maybe that's for another issue)
i'd love to be php-savvy but i'm noob so don't have the possibility to reroll the patch, sorry about that ;-|
Comment #9
marcoBauli commentedComment #10
marcoBauli commentedclosing this as is not a Views problem. Posted also a follow up about this problem on the CCK patch i was talking about (see link at #8 above).