The Drupal 7 ThemeSettings source plugin does not check that the destination site has a valid theme to migrate settings into

Created on 27 November 2019, over 4 years ago
Updated 4 January 2024, 6 months ago

Problem/Motivation

While pair programming with @Wim Leers and attempting to migrate wimleers.com from Drupal 7 to Drupal 8, we realized that Drupal\system\Plugin\migrate\source\d7\ThemeSettings will blindly migrate settings from Drupal 7 into Drupal 8, even if the destination site does not have a corresponding theme for those settings.

Proposed resolution

Have ThemeSettings implement RequirementsInterface and throw a RequirementsException if destination themes that match the source themes are not available.

Remaining tasks

  1. Update the issue summary so that the two sections above describe what the current patch is doing. See #59 πŸ› The Drupal 7 ThemeSettings source plugin does not check that the destination site has a valid theme to migrate settings into Needs work .
  2. Address the BC problem raised in #30 πŸ› The Drupal 7 ThemeSettings source plugin does not check that the destination site has a valid theme to migrate settings into Needs work . See the discussion in the next few comments, especially the recommendation in #34.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Not needed.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated about 7 hours ago

Created by

πŸ‡«πŸ‡·France gabesullice πŸ‡«πŸ‡· β‘ β‘’ UTC+2

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    Comment #21 added the tag for maintainer review, referring to Comment #18. (I think it means #18.1, not #18.2). Before we respond to that question, it will help if the issue summary is updated to explain what the current patch actually does. From Comment #59:

    The scope of this issue is very different from the Issue Summary. The IS needs to be updated.

    Also, #30 raised concerns about BC, and #34 has a specific suggestion for addressing them.

    I am removing the tag for maintainer response and adding a "Remaining tasks" section to the issue summary.

  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    From Comment #32:

    We don't actually have a new plugin id for the destination. So we use the same destination. But because of generated yml files that get exported, one-time, into migrate_plus... we have many cases where incremental migrations will have the updated destination but not the updated yaml that gets generated by the deriver.

    Something similar can happen with any incremental migration, whether it uses core migration plugins or migrate_plus configuration. A developer creates some migrations using the core migrations as a starting point, or the derived migrations. These custom migrations include the destination ID. If we change what that destination ID does, then we can break the custom migrations.

    Also, a single site migration (not an incremental one) can run into the same problem. A complex project might start today using a target site of Drupal 10.0 (or even 9.5) and the final migration might be into a 10.3 or 11.0 site.

  • πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Updated #67 for Drupal 10.2.0.

Production build 0.69.0 2024