[solved?]Transition from cck_taxonomy to cck_taxonomy_ssu
jiangxijay - November 1, 2007 - 03:05
| Project: | CCK Taxonomy Super Select Ultra |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
I've created a handful of fields using cck_taxonomy, and I'd like to try out cck_taxonomy_ssu because I'm interested in free tagging.
I assume that they can't both be activated at the same time (I received array/merge errors when I tried that).
However, as soon as I disable the first module, I also get those errors.
Is there any recommended path for this transition?
Also, I don't see a final release for version 1 on the module page, just 0.9 and 1.x dev. Is there a version 1 available?

#1
click on 'view all releases' on the project page to find v 1.0. I'll have to see why that didn't auto-update the project page's links.
You're right that they can't both be activated at the same time. I thought that I had added stuff in the install file to handle a transition, but perhaps the cck_taxonomy module has changed since then?
Other than that, I really don't recall the how the other module stored things. I'd have to know that before I could suggest a method of migrating that data. Let me know what you find.
#2
Hi,
Adding to above. How to go from "normal taxonomy" transition to ""cck_taxonomy_ssu ?
EDIT: My shortterm solution: http://drupal.org/node/210301#comment-704247
Greetings,
Martijn
#3
Migrating from normal taxonomy and from cck_taxonomy will be different since cck_taxonomy is at least already storing the values in cck tables. I'd suggest changing this to a feature request if you don't find another solution.
#4
#5
OK. So I thought about this a bit today. Since both modules have their content and tables managed by CCK, there isn't really a good way for this module to transition data automatically.
The first step to transitioning data will be to make sure that both modules can be activated at the same time. If that is currently not the case, please let me know what the errors are.
Once they can both be activated at the same time, then a 'simple' SELECT and INSERT pair of SQL statements can get your data from one table to the other. Here's what you would do for that:
--Make sure both modules are setup how you want and make sure that a CCK field for each is on the same content type
--Using PHPMyAdmin or similar, locate the table that contains your current data. It will look something like content_field_FIELDNAME (where FIELDNAME is whatever you named the field) or else it will be a part of the content type's table. The former is easier than the latter.
--Identify the target table of the new CCKTSSU field. It should have all columns defined, but should be empty of data.
--Construct a SELECT statement to collect all data from the first table. Example: "SELECT * FROM content_field_FIELDNAME ORDER BY nid, delta" (remember to correctly prefix the table as PHPMyAdmin won't do it for you.
--Construct an INSERT statement to deposit the data into the second table. Example: "INSERT INTO content_field_NEWFIELDNAME (vid, delta, nid, field_NEWFIELDNAME_tid) VALUES (PASTE YOUR SELECT STATEMENT HERE) - I think this will work. It's similar to http://www.databasejournal.com/features/mssql/article.php/3507171
--Possible problems: you may have to specify columns in your SELECT statement, or you may have to use * in the INSERT statement instead of the fields I named in the parenthesis.
--Note: there is one additional column in the CCKTSSU table that isn't in the cck_taxonomy table - field_YOURFIELDNAME_choice. For this reason, I think you may have to explicitly name all columns for both the SELECT and INSERT statements.
Questions? Anyone have an idea how to automate this?
#6
#7
Suscribing