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 5 years ago
Updated 30 January 2023, over 2 years 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.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Not needed.

πŸ› Bug report
Status

Needs work

Version

9.5

Component
MigrationΒ  β†’

Last updated about 15 hours ago

Created by

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.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

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.

  • Status changed to Postponed 13 days ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    The Migrate Drupal Module was approved for removal in πŸ“Œ [Policy] Migrate Drupal and Migrate Drupal UI after Drupal 7 EOL Fixed .

    This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project β†’ and the Extensions approved for removal β†’ policies.

    The deprecation work is in πŸ“Œ [12.x] [Meta] Tasks to remove Migrate Drupal module Postponed and the removal work in πŸ“Œ [12.x] [Meta] Tasks to remove Migrate Drupal module Postponed .

    Migrate Drupal will not be moved to a contributed project. It will be removed from core after the Drupal 12.x branch is open.

Production build 0.71.5 2024