I merged various patches that people have submitted, and tested it with a toy database. My notes are below, and the pre-convert test database is attached. I committed the changes (and updated README file) to the DRUPAL-4-7 branch.
Someone may want to test it on another platform/mysql version before rolling out an updated version.
-josiah
Flexiconvert Working Notes
Test database and virtual host are both named flexiconvert_test.
Username is flexiconvert, pwd is flexiconvert_test
Test setup:
drupal v 4.7.7
modules:
cck 4.7--1.6-1
date 4.7--1.7
email 4.7--1.6-1
filefield 4.7--1.12.2.1
flexiconvert 4.7--0.2 (modified)
flexinode 4.7--0.3
image 4.7--1.x-dev
imagefield 4.7--1.1
link 4.7--2.0
mysql Ver 14.12 Distrib 5.0.45, for apple-darwin8.5.1 (i686) using readline 5.0
Platform: OS X v 10.4.10, Intel
(Unreported?) Bug: failed attempt to copy text_area's formating from flexinode. Failure results from cck column not existing.
Solution (tested, works): check for existence of 'format' column before issuing an update on it.
Bug: Funny characters in cck fields names are incorrectly translated to column names.
http://drupal.org/node/139801
Solution (tested, works): remove funny characters and limit the maximum length of the field name. Used patch, then expanded it to cover more characters.
Bug: No conversion of timestamp or checkboxes
http://drupal.org/node/141733
Solution (tested, works): Patch did not copy false values from checkboxes because of the if statement was confusing a numeric value of 0 with the value not existing. I fixed by using the more formal test of "array_key_exists", and applied that pattern to all the other if statements in that block.
Bug: No conversion of email, checkbox or select
http://drupal.org/node/139803
Solution (tested, works): Used email portion of patch. Works fine if cck's email module is installed.
Solution (tested, works): Merged Select portion of patch into timestamp/checkbox block. Tested that it copies the select field only if it is populated.
-- Notes --
* Enable Date API before defining CCK date fields
* CCK select field needs to be an Integer type rather than a text type. Remember to follow ptalindstrom's advise from response #5 on the referenced thread and manually set up the CCK select field to exactly match the values of the old flexinode convert field.
| Comment | File | Size | Author |
|---|---|---|---|
| 03_cck_type_defined.txt | 134.74 KB | siah |
Comments
Comment #1
dwwI'm happy to see you're spending energy on this module, since I'm going to need it in the near future. Thanks!
However, for future reference: this isn't the best way to do development. By merging all the patches together into a single, monolithic commit, it makes it vastly harder to untangle future bugs. Revision control is all about keeping track of changes. If you merge everything into a giant diff, and replace 100s of lines at a time, if anything goes wrong, it's a) much harder to track down the source of the problem, and b) impossible to easily undo the part you broke. Plus, there's no clear connection between a line of code that was updated in a given revision of the file and what patch/issue that change came from.
In the future, please apply patches one at a time, with a commit message that includes the issue number where that patch came from.
Thanks!
-Derek
p.s. there's nothing more you expect to do with this issue, right? so i'm marking it fixed, so it doesn't remain "active" in the issue queue, where people might look at it expecting to find work that needs to be done...
Comment #2
dwwp.s. For future reference, http://drupal.org/node/52287 might be a good read on constructing high quality commit messages. Cheers.
Comment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.