Migrate data from core profile

Created on 19 March 2024, over 1 year ago
Updated 16 April 2024, about 1 year ago

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 ✨ Migrate data from Profile2 Needs work .

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 ✨ Migrate data from Profile2 Needs work , 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 ✨ Migrate data from Profile2 Needs work . I think that a custom migration class like User implements would work.

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mradcliffe
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Happy to help on this but can a can a complete D7 fixture be created, so I can use the UI?

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    Thank 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.

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    mradcliffe β†’ changed the visibility of the branch 3432198-core-profile-migrate to hidden.

  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 120s
    #148161
  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    Okay, had a bit of extra time, so added the fixture from drupal6 into drupal7. Setting to Needs work.

  • Pipeline finished with Success
    about 1 year ago
    Total: 159s
    #148162
  • Pipeline finished with Success
    about 1 year ago
    Total: 311s
    #148432
  • Pipeline finished with Failed
    about 1 year ago
    Total: 156s
    #148439
  • πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

    Okay, I think the fixture is ready. I added some tests and stub tests.

  • Pipeline finished with Failed
    about 1 year ago
    Total: 162s
    #148476
  • Pipeline finished with Failed
    about 1 year ago
    Total: 162s
    #150427
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 36s
    #150448
  • Pipeline finished with Failed
    about 1 year ago
    Total: 305s
    #150449
Production build 0.71.5 2024