Problem/Motivation
Per Drupal core #1261576: Profile module data is not upgraded, core would not handle migration of core profile data and marked itself as a duplicate of #2957256: Migrate data from Profile2.
Since that issue is now resolved and got rescoped to profile2 module migration only, I'm capturing core profile into this issue.
A few years ago, I was hacking around migrate and managed a manual solution, but that's not a good approach.
Steps to reproduce
- Core profile fields migrated on user entity instead of profile.
Proposed resolution
A few years later/wiser, I think to handle this programmatically:
- Alter to change handling for user profile fields and field instance updating constants, bundle and type static map (hook_migration_plugins_alter)
- Alter d7_user to remove any user profile handling (hook_migration_plugins_alter()).
- Add a migration template similar to d7_user like implemented in #2957256: Migrate data from Profile2. I think that a custom migration class like User implements would work.
Issue fork profile-3432198
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3432198-core-migrate changes, plain diff MR !26
- 3432198-core-profile-migrate compare
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedHappy to help on this but can a can a complete D7 fixture be created, so I can use the UI?
Comment #3
mradcliffeThank you. I think we could start by copying the profile_fields and profile_values lines from the core drupal6 fixture. Maybe the only difference between 6 and 7 are the changes in table names (profile_fields to profile_field and profile_values to profile_value)..?
Maybe an initial kernel test to assert fields not created on the user entity?
I'll create an issue fork, but I don't know when I'll personally have a chance to work on it.
Comment #5
mradcliffeComment #7
mradcliffeOkay, had a bit of extra time, so added the fixture from drupal6 into drupal7. Setting to Needs work.
Comment #8
mradcliffeOkay, I think the fixture is ready. I added some tests and stub tests.