Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.6-beta
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2007 at 06:17 UTC
Updated:
27 Apr 2007 at 16:17 UTC
After upgrading from 5.x-1.5 I get the following error message on some output pages:
user warning: Unknown column 'content_type_forum.field_posts_value' in 'where clause' query: SELECT count(node.nid) FROM drupal_node node LEFT JOIN drupal_content_type_forum node_data_field_posts ON node.vid = node_data_field_posts.vid WHERE (node.status = '1') AND (node.type IN ('forum')) AND (content_type_forum.field_posts_value > '0') in /srv/www/vhosts/myproject.de/httpdocs/includes/database.mysqli.inc on line 151.
The field content_type_forum.field_posts_value should be drupal_content_type_forum.field_posts_value. So it looks like the database table prefix is missing.
This error occurs only with view type Table View.
Ciao Alex...
Comments
Comment #1
merlinofchaos commentedYour assessment is incorrect. The table 'content_type_forum' is properly getting the index, but instead of being aliased to 'content_type_forum' it's being aliased to 'node_data_field_posts'.
This may be a cascade effect from another bug I fixed. This may or may not be a CCK issue; I'm not certain and I know yched reads these issues so I'm going to leave it here for the moment.
Comment #2
merlinofchaos commentedOk, I believe this was caused by http://drupal.org/node/130196 -- I've reverted that patch for beta3.
Comment #3
merlinofchaos commentedComment #4
yched commentedThe 'node_data_*' alias is the normal one for cck field tables.
The actual tables have indeed moved to the 'content_*' namespace to avoid conflict with core tables (that was CCK 1.2 or 1.3), but I was not sure of the consequences of renaming the views _aliases_, so i left them as they were, would certainly can be confusing (but at least makes it clear that we're dealing with aliases :-) )
Comment #5
(not verified) commented