Civinode CCK creating invalid sql
quinn - February 26, 2009 - 19:33
| Project: | CiviNode And Civinode CCK |
| Version: | 5.x-1.2 |
| Component: | CCK Integration |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I've ran civinode cck and performed all the fixes, along with changing some of the function names to match the civicrm 2.0 api, but now i'm getting an error because of invalid sql when tryinig to create a cck field of type civicrm contact.
here is the error:
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 'civicrm_contact'', `field_adjusters_entity_subfield` VARCHAR(120) DEFAULT ''dis' at line 6 query: CREATE TABLE content_field_adjusters ( `vid` INT unsigned NOT NULL DEFAULT 0, `nid` INT unsigned NOT NULL DEFAULT 0, `delta` INT unsigned NOT NULL DEFAULT 0, `field_adjusters_object_id` INT NOT NULL DEFAULT 0, `field_adjusters_entity_type` VARCHAR(50) NOT NULL DEFAULT ''civicrm_contact'', `field_adjusters_entity_subfield` VARCHAR(120) DEFAULT ''display_name'', PRIMARY KEY (vid, delta), INDEX nid (nid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /Library/WebServer/Documents/includes/database.inc on line 516.now its obvious what the problem is, the field names are getting quoted twice. i imagine there is some function that is used for quoting field names before they are put into a query, my guess is for whatever reason that method is being called twice, my guess is it has something to do with "hook_field_info" in civinode cck. any thoughts?
