Closed (fixed)
Project:
Flexinode to CCK Converter
Version:
5.x-0.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
18 Jun 2008 at 18:35 UTC
Updated:
18 Jun 2009 at 17:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
jmlavarenne commentedThe only solution I could come up with was to migrate the content from the flexinode tables to the CCK table with my own script and drop the body content from the node_revisions table for that content type.
Comment #2
aj045 commentedDo you have a screenshot you could post?
Comment #3
jmlavarenne commentedNot really. There was not that much to show anyway - all flexinode fields were incorporated into the body field in the revisions table, as one big html string, each field in it's own div tag with it's own label.
I've destroyed that content since my last message after migrating the flexinode fields to CCK fields with a custom script.
Comment #4
aj045 commentedYeah, dealing with all the possible cases under which web sites implemented Flexinode types is hard to account for in this kind of conversion module. I have a long list of bugs for this module sitting not far from me. I think one of the bugs fits your case.
Comment #5
jmlavarenne commentedIf my experience with this issue can be useful in dealing with the bug I'll gladly do what I can.
Comment #6
aj045 commentedWell, if you can find a solution, create a patch and post it. :)
Comment #7
karger commentedI've just encountered exactly the behavior originally described in this issue. I'm using the 5.x-0.3 flexiconvert to convert content from a 4.7 installation. The flexinode type is very simple---just a lot of text fields. The field definitions were all converted successfully, as shown by a look at the "manage fields" tab in under content type management---but for all nodes, the content of those fields has been shoved into the body, and the field contents are all empty. I'm also getting the following error when I click the "display fields" tab:
warning: Invalid argument supplied for foreach() in /home/karger/public_html/test/modules/cck/content_admin.inc on line 418.
repeated many times thought not as many times as I have fields.
Unlike the previous poster, I still have the 4.7 installation and can produce whatever data would be helpful for resolving this bug.
Comment #8
anarcat commentedI confirm this issue happened to us too.
Comment #9
anarcat commentedSo after investigation, what happens is this: even *before* flexiconvert is ran, the body is filled with a bunch of flexinode rendering. In our case, we migrated from 4.6.11 to 4.7 to 5. Even in our 4.7, the body were already screwed up. We're looking into the process to see where exactly that happened but it is not flexinode's fault.
Comment #10
anarcat commentedThinking more and testing, the fact that the fields are empty after running flexiconvert *is* a bug, whatever content is in the body. I'll try to debug this more but from my testing, the content_submit() never does any SQL request in the backend, even though the array submitted looks sane. Maybe the CCK API changed since...
Comment #11
ngaur commentedI'm seeing this same bug. I've done a bit of poking around.
I can't say whether the node is being formatted for insertion correctly, but the data structure presented does have the expected fields and field content in it.
It might be significant that the content type in question is of type basicevent.
Comment #12
anarcat commentedSo I've made this work for us. I've got this serie of patches here. The first thing was to fix indentation because the code was unreadable in emacs. I don't know if i respect the drupal standards, but at least it's spaces.
The second patch makes the code re-entrant and fixes the API with CCK (content_insert() instead of content_submit(), which does nothing).
I hope this can get in as it's pretty useful to avoid memory and execution time limits. Without this patch, I was never able to convert any field at all with recent CCK versions (5.x-1.6 and up).
Comment #13
anarcat commentedaj045 gracefully allowed me to commit straight to the tree. I have made a few fixes that allowed me to import two different content types ("event" and "article"), data included. Note that the body still shows the old rendering of flexinode data: I consider this a feature (it's a backup). Once you're certain the migration was successful, you can hide the body field through the content type settings (by setting its title to blank) or simply UPDATE the node database to empty the body. Same applies to the teaser.
Comment #14
anarcat commentedOh and note that images are not properly imported yet, see #481616: Support for importing files and images in latest version.