Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.0-rc3
Component:
Views Integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2008 at 15:11 UTC
Updated:
21 Oct 2008 at 11:13 UTC
I have two views defined querying a group of nodes I've defined with CCK. One of the fields is a text field with a list of allowed values. Some of the allowed values have blanks in some names. In the error (listed below) one of these allowed values ("Carbon Neutral") is showing up in the SQL query as if it were a field name.
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 'Neutral ON node.vid = node_data_field_web_hosting_special_featu_Carbon Neutral.v' at line 5 query: SELECT COUNT(*) FROM (SELECT node.nid AS nid, node.title AS node_title FROM node node LEFT JOIN content_field_web_hosting_special_featu node_data_field_web_hosting_special_featu_Green ON node.vid = node_data_field_web_hosting_special_featu_Green.vid AND node_data_field_web_hosting_special_featu_Green.field_web_hosting_special_featu_value = 'Green' LEFT JOIN content_field_web_hosting_special_featu node_data_field_web_hosting_special_featu_Carbon Neutral ON node.vid = node_data_field_web_hosting_special_featu_Carbon Neutral.vid AND node_data_field_web_hosting_special_featu_Carbon Neutral.field_web_hosting_special_featu_value = 'Carbon Neutral' WHERE (node.type in ('web_hosting_provider')) AND (node.status <> 0) AND (node_data_field_web_hosting_special_featu_Green.field_web_hosting_special_featu_value = 'Green' OR node_data_field_web_hosting_special_featu_Carbon Neutral.field_web_hosting_special_featu_value = 'Carbon Neutral') ) AS count_alias in /home/.nurse/reikiman/davidherron.com/sites/all/modules/views/includes/view.inc on line 652.
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 'Neutral ON node.vid = node_data_field_web_hosting_special_featu_Carbon Neutral.v' at line 5 query: SELECT node.nid AS nid, node.title AS node_title FROM node node LEFT JOIN content_field_web_hosting_special_featu node_data_field_web_hosting_special_featu_Green ON node.vid = node_data_field_web_hosting_special_featu_Green.vid AND node_data_field_web_hosting_special_featu_Green.field_web_hosting_special_featu_value = 'Green' LEFT JOIN content_field_web_hosting_special_featu node_data_field_web_hosting_special_featu_Carbon Neutral ON node.vid = node_data_field_web_hosting_special_featu_Carbon Neutral.vid AND node_data_field_web_hosting_special_featu_Carbon Neutral.field_web_hosting_special_featu_value = 'Carbon Neutral' WHERE (node.type in ('web_hosting_provider')) AND (node.status <> 0) AND (node_data_field_web_hosting_special_featu_Green.field_web_hosting_special_featu_value = 'Green' OR node_data_field_web_hosting_special_featu_Carbon Neutral.field_web_hosting_special_featu_value = 'Carbon Neutral') LIMIT 0, 30 in /home/.nurse/reikiman/davidherron.com/sites/all/modules/views/includes/view.inc on line 677.
Comments
Comment #1
yched commentedI can't reproduce this.
Could you paste an export of the view you're using ?
Besides, it seems that your field name is quite long and has been truncated at some point ('field_web_hosting_special_featu' is 31 chars long, the db limit being 32). Maybe related, maybe not.
This limitation, while present in the db, has been enforced in the UI only recently ('create field' form doesn't validate if the field name is too long).
Maybe your field was created before this change in the D6 code ? Or does it come from a D5 site upgraded to D6 ?
Comment #2
karens commentedVery old report, no response, assuming fixed.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.