Problem/Motivation
Chosen doesn't have migration path from Drupal 7 to Drupal 9+.
Proposed resolution
Implement migration path from Drupal 7 to Drupal 9+.
Remaining tasks
- Migrate D7 Chosen settings to D9+
- Map D7 chosen field widgets to D9+
User interface changes
Nothing.
API changes
New migrate process plugin that maps d7 chosen field widget configs to the D9+ Chosen field widget plugin ID.
Data model changes
Nothing.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff-3274968-6-8.txt | 1.01 KB | yash.rode |
| #8 | chosen_Migrate_chosen_from_D7_to_D9-3274968-8.patch | 36.8 KB | yash.rode |
Comments
Comment #2
yash.rode commentedMigration for Chosen.
Comment #4
yash.rode commentedComment #5
huzookaWe need our usual check whether the chosen module is enabled on the source.
If it isn't, then we shouldn't migrate its settings, nor modify the field widget settings migration.
It would be nice to add the
source_module: chosenconfiguration here.We have to properly handle the default values here:
I checked only
chosen_minimum_single: Its default value in Drupal 7 is 20 (and it can be configured to be (int)0, so this process plugin should be:Please check the other Drupal 7 variables as well, and update the process pipeline accordingly!
👍 Very elegant and clear!
Comment #6
yash.rode commentedfollow up for #5
Comment #7
huzookaI still have to nits (and I'm very sorry I didn't notice them before).
But other than that, #6 is perfect!
These classes aren't used.
This test method should be renamed!
Comment #8
yash.rode commentedfollow up for #7.
Comment #9
nagy.balint commentedHi!
Shoudn't this be a separate module?
For example: https://www.drupal.org/project/webform_migrate
https://www.drupal.org/project/media_migration
https://www.drupal.org/project/paragraphs_migration
Comment #10
huzookaRe @nagy.balint, I don't think so. This migration path consists of only:
hook_migration_plugins_alter()implementation and a migrate process plugin which migrate the right form widget for the fields which are using Chosen in the source Drupal 7 instance.The bulk of the patch is a Drupal 7 database fixture and a migration test that uses that fixture to prove it works as expected.
If you check the modules you mentioned, they have a huge codebase. Chosen's situation is much simpler imho. https://git.drupalcode.org/project/address/-/tree/8.x-1.x/src/Plugin/mig...
Re #8:
This is now perfect! 🥳
Comment #11
huzookaComment #12
nagy.balint commentedShouldnt it be a sub module the very least?
Comment #13
nagy.balint commentedAfter further research, it seems that its only me who finds it weird to have these in the main module.
So then I can commit it.
Comment #15
nagy.balint commentedThank you!