Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
follow-up of #1578694: migrate fields can't be run missing cck_country Drupal 7, countries does not provide an upgrade-path for D6 users of cck_country
.
These are stuck or forced to tweak DB or use custom code in order to do that.
The field is probably easier to handle and upgrade than most others.
Any hope to see either countries.migrate.inc
implemented or a countries_update_7000
written ?
I'm sorry but I can't myself afford the time to write (but more importantly understand) an upgrade-path for each and every D6 modules I use which are still missing one.
Comment | File | Size | Author |
---|---|---|---|
#11 | 1840472-11.patch | 2.86 KB | drzraf |
Comments
Comment #1
Alan D. CreditAttribution: Alan D. commentedMigrate support was added here: #1378662: Add support for Migrate API
Reopen if you have issues
btw, hopefully I will find the time to roll a new tag soon, the last one was Feb 9, so this is lagging behind the dev branch slightly!
Comment #2
Alan D. CreditAttribution: Alan D. commentedComment #3
drzraf CreditAttribution: drzraf commentedThen it's more about a support request :
Going to D7's
/admin/structure/content_migrate
:field_cckcountry :
How would I run a content migration ?
Comment #4
drzraf CreditAttribution: drzraf commentedComment #5
Alan D. CreditAttribution: Alan D. commentedHi just transfer queues to see if there is any way that the countries module can assist users upgrading from cck_country field. Internally the schema is very similar I thing.
Thanks in advance
Comment #6
drzraf CreditAttribution: drzraf commentedAlan, I anticipate a bit on migrate maintainers answer, but
what the drush-magic-script should looks like (in order to run the
cck_country
-to-countries
migration without depending on migrate restrictions) ?I believe
MigrateCountryFieldHandler
exists for a reason, how isprepare()
expected to be called and to save fields value ?Comment #7
mikeryanImplementing a migration path between two contrib modules is most certainly not in the Migrate module's domain - it's up to the destination module to make use of the Migrate API in implementing the migration path.
Comment #8
Alan D. CreditAttribution: Alan D. commentedI personally have extremely limited time atm, I was just trying to get pointers....
Comment #9
drzraf CreditAttribution: drzraf commentedI looked at #1232028: Support for Migrate package which was about cck_email, so while the code is very similar to the one already commited into countries it does not give a hint about the migrate API.
#1821878: Migration of location_cck data into addressfield has no patch available.
http://drupalcode.org/project/migrate_extras.git/blob/refs/heads/7.x-2.x... wasn't helpful either.
But it seems that cck/modules/content_migrate/content_migrate.api.php could be helpful, especially hook_content_migrate_field_alter() which gives what appears to be a hint about the migrate hook to implement:
http://drupalcode.org/project/cck.git/blob/refs/heads/master:/modules/co...
Comment #10
drzraf CreditAttribution: drzraf commentedhum, after a deeper look cck
content_migrate
does not really use themigrate
API.But content_taxonomy does.
It does not provide module.migrate.inc but rather a new distinct sub-module, see:
http://drupalcode.org/project/content_taxonomy.git/blob/refs/heads/7.x-1...
Comment #11
drzraf CreditAttribution: drzraf commentedComment #12
drzraf CreditAttribution: drzraf commentedjust posted #1841578: cck_country upgrade-path so that cck_country authors know they're (still) needed to review this.
Comment #13
drzraf CreditAttribution: drzraf commentedping
Comment #14
drzraf CreditAttribution: drzraf commentedping
Comment #15
Alan D. CreditAttribution: Alan D. commentedThis would definitely need addressing:
Maybe drupal_set_message() instead?
And I guess general migrate support can be added at the same time. We just done a big D6 to D7 data migration and I do not think that this was used, or if from another unrelated issue post... And may not have any testing...
The raw code from my local countries.module.
Makes sense to wrap all of this into one sub-module :)