Migrate data from Profile2

Created on 30 March 2018, about 7 years ago
Updated 4 September 2023, over 1 year ago

Has you plans to migrate data from Profile2 module?

Feature request
Status

Needs review

Version

1.0

Component

Miscellaneous

Created by

🇷🇸Serbia super_romeo Belgrade

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    23 pass
  • 🇮🇳India junaidpv Kannur, Kerala

    My profile2 type migration failed because somehow the profile2 type configuration in D7 having "roles" property with empty (0) for all non-selected roles. Filtering roles property from source solved the issue.

    Here is the updated patch.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • Status changed to RTBC over 1 year ago
  • 🇮🇳India ajeet_kumar gurugaon

    I reviewed and tested patch #49 working for me

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    23 pass, 2 fail
  • 🇺🇦Ukraine sickness29

    Made migration test for both profile 2 types and profiles along with fixture for D7.
    Also had to move views.view.profiles.yml into config/optional as migrate tests were failing because of this

  • The last submitted patch, 51: profile2_migrate-2957256-51.patch, failed testing. View results
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • Status changed to Needs review about 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    25 pass
  • 🇺🇦Ukraine sickness29

    Removing phpass in test modules list

  • 🇨🇦Canada joelpittet Vancouver

    Same issue as #41

    [warning] Undefined array key "use_page" Profile2Type.php:57
     [warning] Undefined array key "use_page" Profile2Type.php:57
     [warning] Undefined array key "use_page" Profile2Type.php:57
     [warning] Undefined array key "use_page" Profile2Type.php:57
     [warning] Undefined array key "use_page" Profile2Type.php:57
     [warning] Undefined array key "use_page" Profile2Type.php:57
    

    Apparently that key is not saved in 1.7 of profile2

  • 🇨🇦Canada joelpittet Vancouver

    @sickness29 There has got to be a better way to do test, 2MB patch files look a bit extreme, no?

    Thanks for taking a crack at it though, tests are my least favourite task but generally really rewarding once they are working.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    23 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    25 pass
  • 🇨🇦Canada joelpittet Vancouver

    Here's a couple patches for easier review I have included an interdiff for the fix reported in #41 and #54.

    And two patches based off #49 (without 2MB of tests) and #53

  • 🇮🇱Israel jsacksick

    I also wonder if we can find a middleground between no tests and 2MB of tests data :).
    @ sickness29: Is that possible?

  • 🇺🇸United States mradcliffe USA

    I also wonder if we can find a middleground between no tests and 2MB of tests data :).

    You should be able to re-use drupal core's fixture along with an additional smaller fixture under 10k. The smaller fixture that is targeted only at profile2 data can be manually crafted rather than using the database dump script.

    So instead of

    +
    +  /**
    +   * Gets the path to the fixture file.
    +   */
    +  protected function getFixtureFilePath() {
    +    return __DIR__ . '/../../../../fixtures/drupal7.php';
    +  }
    +
    +  /**
    +   * {@inheritdoc}
    +   */
    +  protected function setUp(): void {
    +    parent::setUp();
    

    Remove the overridden getFixtureFilePath(), and do something like this instead:

      /**
       * {@inheritdoc}
       */
      protected function setUp(): void {
        // The default drupal 7 database fixture will be loaded first as part of parent setUp method.
        parent::setUp();
    
        $profile2Fixture = __DIR__ . '/../../../../fixtures/drupal7.php';
        $this->assertNotFalse(realpath($profile2Fixture));
        $this->loadFixture($profile2Fixture);
    
    
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    24 pass, 2 fail
  • 🇺🇦Ukraine khiminrm

    I've made fixes according to the comment #58.
    I've used 2957256-56-from-53-migrate-profile2.patch from the #56 as starting point and added the fixes.

  • The last submitted patch, 59: 2957256-migrate-profile2-59.patch, failed testing. View results
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • 🇺🇦Ukraine khiminrm

    I've moved views.view.profile.yml to optional similar as in #51 Migrate data from Profile2 Needs work and added some more data to the fixture file.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update about 1 year ago
    26 pass
  • Status changed to Needs review about 1 year ago
    • jsacksick committed 0ebdb0d4 on 8.x-1.x
      Issue #2957256 by super_romeo, ocastle, khiminrm, marvil07, joelpittet,...
  • Status changed to Fixed about 1 year ago
  • 🇮🇱Israel jsacksick

    Committed, thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇮🇳India Nishant

    I have tried solution 36 But still getting same issue.
    drush migrate:import d7_field
    3/95 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 3% [error] Attempt to create a field storage field_countries with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    [error] The "country" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    6/95 [▓░░░░░░░░░░░░░░░░░░░░░░░░░░░] 6% [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] Attempt to create a field storage field_hq_country with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    7/95 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 7% [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    9/95 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 9% [error] Attempt to create a field storage field_participants with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    12/95 [▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░] 12% [error] Attempt to create a field storage field_countries with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    23/95 [▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░] 24% [error] Attempt to create a field storage field_report_details with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    24/95 [▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░] 25% [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    30/95 [▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░] 31% [error] Attempt to create a field storage field_author_collection with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    34/95 [▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░] 35% [error] Attempt to create a field storage field_source with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    35/95 [▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░] 36% [error] Attempt to create a field storage field_event_url with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    40/95 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░] 42% [error] Attempt to create a field storage field_external_link with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    42/95 [▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░] 44% [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    44/95 [▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░] 46% [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] Attempt to create a field storage field_telephone with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    [error] Attempt to create a field storage field_country with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] Attempt to create a field storage field_official_website with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    46/95 [▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░] 48% [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] The "profile2" entity type does not exist. (/var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:150)
    [error] Attempt to create a field storage field_data_protection with no type. (/var/www/html/web/core/modules/field/src/Entity/FieldStorageConfig.php:258)
    95/95 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
    [notice] Processed 95 items (59 created, 0 updated, 36 failed, 0 ignored) in 4.3 seconds (1317.9/min) - done with 'd7_field'

    In MigrateRunnerCommands.php line 458:

    d7_field migration: 36 failed.

    Failed to run drush migrate:import d7_field: exit status 1

Production build 0.71.5 2024