Drupal 7 field groups defined in Features field_group.inc files will not migrate.

Created on 8 August 2019, almost 5 years ago
Updated 25 January 2024, 5 months ago

The first issue I ran into is that the migrate plugin looks for rows in the field_group db table which most of the time will not be populated if the Drupal 7 site is using Features. Is there a way around this issue?

Also, when I re-save the "manage fields" tab for the content type it will force data back into the field_group database table which lets the migration run successfully but even after that I don't see a field group on the form display page (not even disabled).

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States drupalninja99

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    Wow, I was so so so so confused as to why four content types' field groups had migrations and no others! (because, Features were maintained for a while after this site was built but not forever, so there are content types and stuff with outdated or zero features)

    Thank you everyone on this thread for sharing, and thank you @kevinquillen for the solution share! -- I haven't tried that part out yet, we're in a discovery phase, but I'm adding this to my notes for when we get to implementation.

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    I've used the above trick a few times since then, YMMV.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    @kevinquillen What's the reason for putting the features modules into the Drupal 9 site codebase? I'm missing where/how that part fits in.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    OH! Never mind, I see it now!!

  • πŸ‡ΊπŸ‡ΈUnited States kevinquillen

    They only exist so PHP can read the definitions of them in, in order to create the database records needed for the migration to pick them up.

  • πŸ‡ΊπŸ‡ΈUnited States alison

    Thank you! -- in case it helps anyone else who stops by this thread, my process for using the generated migrations was (and idk if this is best / correct, but it ended up working for me):

    TL;DR: Run the field group migrations after field, field_instance, and field_instance_widget_settings migrations.

    More specifically, this was my order of things:

    1. Run some migrations that tend to be dependencies of node/content migrations:
      1. upgrade_d7_user_role
      2. upgrade_d7_filter_format
      3. upgrade_d7_node_type
      4. upgrade_d7_user
      5. upgrade_d7_field
      6. upgrade_d7_view_modes
      7. upgrade_d7_taxonomy_vocabulary
      8. (then specific taxonomy/vocab migrations)
    2. Then...
      1. upgrade_d7_field_instance
      2. upgrade_d7_field_instance_widget_settings
    3. Then, "field group" migrations, i.e. upgrade_d7_field_group_node_news
    4. P.S. It also worked when I ran the field group migrations before the field instance widget settings migrations (accidentally, but it worked).
  • πŸ‡ΊπŸ‡ΈUnited States alison

    I came across a couple other "site building things" that don't migrate smoothly / out-of-the box due to not being in the source site database when they're in Features (image styles, views), and posted about it here:
    https://www.drupal.org/forum/support/upgrading-drupal/2024-01-24/upgradi... β†’

    Mainly, I'm just sharing in case it's helpful to others, but if anyone's run into other "site building things" that behave like that, I hope you'll comment on the Forum thread!

Production build 0.69.0 2024