I tried to export a very simple CCK node. Just a title and a text field, and one record.
export_test is the name of the cck field
text_1 is the name of the text field
I have Drupal 4.7.3 Installed with no other modules besides the basic install set, CCK and import-export
Here is the result:
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 'AS text1_value, .vid AS text1_vid, .nid AS text1_nid, u.name, u.mail, ff.name AS' at line 1 query: SELECT nr.nid, nr.vid, nr.uid, nr.title, nr.body, nr.teaser, nr.log, nr.timestamp, nr.format, .field_text1_value AS text1_value, .vid AS text1_vid, .nid AS text1_nid, u.name, u.mail, ff.name AS format_name FROM node_revisions nr LEFT JOIN node_content_export_test ON nr.vid = .vid LEFT JOIN users u ON nr.uid = u.uid LEFT JOIN filter_formats ff ON nr.format = ff.format in /srv/www/htdocs/ca/public_html/4.7.3/includes/database.mysql.inc on line 120.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | node_type_table.patch.txt | 1.17 KB | JacobSingh |
Comments
Comment #1
owen barton commentedI can also reproduce this error - pasted below with an xdebug stack trace.
PHP 5.1.0
MySQL 5.0.22
Comment #2
JacobSingh commentedOkay, There are actually two seperate issues here.
One is that as of the new cck update, node_type is now called node_type_content
The second is that the hook content_def_tables should be content_db_def_tables
These two fixes seem to make it work
Comment #3
Jaza commentedPatch committed to HEAD. Thanks, Jacob and Grugnog. ;)
For some reason, the errors weren't showing up for me (maybe my error_reporting is set too low?). But anyway, before applying the patch, the export was running without outputting the node revisions, and after applying, it was running with the node revisions. So I reproduced the bug nonetheless.
I didn't expect them to change the name of the 'node_type' CCK table for the 4.7 branch. They only needed to change it for HEAD. But anyway, c'est la vie!
Comment #4
scroogie commentedI dont get a mysql error now, but the first row that gets exported is still empty (meaning that the column titles dont get printed).
Comment #5
(not verified) commented