Flexiconvert, files, and images, e-mail, etc.

bomarmonk - August 3, 2007 - 18:39
Project:Flexinode to CCK Converter
Version:4.7.x-0.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:patch (to be ported)
Description

I am trying to convert over a hundred flexinode files into CCK files. The flexiconvert module is set up to do this, but I think the file transfer code was written with MySQL 5 in mind. I have mySQL 4.0.18. The image files and everything else is getting properly imported into CCK (well, actually, the second attempt didn't work out so well for the images, but I think they are there), so it should be doable for the files. Right now, the file nodes are created in CCK, but the actual files are not contained in the nodes. I'm getting errors in my SQL syntax that may illustrate an obvious fix for those who know the syntax. Can anyone help me figure out how to adjust the syntax in this part of the flexiconvert module so that it will work with 4.0,18? Here is the error I am getting:

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 '(pdf)_fid = '1741', field_county_document_(pdf)_description = ' query: UPDATE node_content_county_file_or_form_cck SET field_county_document_(pdf)_fid = '1741', field_county_document_(pdf)_description = 'EDMS RFP -Alpine County v2.pdf', field_county_document_(pdf)_list = '0' WHERE nid = 1314 in /home/WWW/mysite/includes/database.mysql.inc on line 121.

Any ideas?

#1

bomarmonk - August 3, 2007 - 18:41

Does this have something to do with the fact that the file field in CCK does not have an "allow user choose input type" associated with it? Another post about this module suggested that the CCK fields will not be properly filled with the data unless the input type is properly set.

#2

bomarmonk - August 5, 2007 - 23:05
Title:Flexiconvert, files, and images» Flexiconvert, files, and images, e-mail, etc.
Priority:critical» normal

I removed the parenthesis from the label for my file field in both flexinode and cck-- then the files were exported properly. I was still getting MySQL errors with the e-mail field etc., but it won't be a huge chore for me to reinsert this data now that the nodes have been created. I'll keep this issue open as there are still some issues with exporting links, e-mails, and images.

#3

TheMystic - August 22, 2007 - 21:43
Status:active» needs review

This issue should be fixed by the attached patch. It modifies the computation of the CCK field name to match the way that CCK itself computes a field name (changing ' ' and '-' to '_' and then stripping anything but letters, numbers and '_').

AttachmentSize
cck_field_names.patch 616 bytes

#4

anarcat - April 30, 2009 - 16:28
Status:needs review» patch (to be ported)

Patch looks sound, but doesn't apply on the 4.7 branch.

#5

anarcat - June 4, 2009 - 04:29

Note that this patch seems to be already present in the 0.3 version.

 
 

Drupal is a registered trademark of Dries Buytaert.