Missing migration filters that are replaced with filter_null may have invalid settings applied

Created on 22 February 2018, over 6 years ago
Updated 7 February 2023, over 1 year ago

Problem/Motivation

Whever I try the upgrade, it hangs at 38%. Checking the error log, I see multiple entries with the message "Missing filter plugin: filter_null."

I know that the PHP plugin was enabled on the old site, so not sure if it's related to that. I did try enabling the contrib version of the D8 PHP filter, but php still showed up as a missing dependency, and there was no change in the import.

Proposed resolution

When replacing a filter with filter_null, be sure we are stripping out any settings that may fail a validation check.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

In previous versions of Drupal 8, if a corresponding D8 filter was not found for a D6/D7 filter, it would get mapped to filter_null, but the settings would be retained. This "mixed-mapping" was a bug, which could later lead to configuration schema validation errors. The new behaviour is to instead drop the filter settings, with a message directing users to either re-configure the format by hand, or attempt the migration again with a D8 version of the dropped filter in question.

πŸ› Bug report
Status

Fixed

Version

8.8 ⚰️

Component
MigrationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΈπŸ‡ͺSweden NiklasBr

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

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.

  • πŸ‡©πŸ‡ͺGermany Grevil

    Small hint if anyone is still having this issue during a Drupal 7 to Drupal 9 Migration:

    You can skip the empty filters through migration, by adding the "skip_on_empty" plugin in your "upgrade_d7_filter_format" migration yaml.
    Either by directly inserting it in the process pipeline:

    process:
      filters:
        -
          plugin: skip_on_empty
          method: row
        -
          plugin: sub_process
          source: filters
          [...]
    

    Or through the usage of hook_migrations_plugins_alter():

      foreach ($migrations as $migrationId => &$migration) {
        if ($migrationId == 'upgrade_d7_filter_format') {
          array_unshift($migration['process']['filters'], [
            'plugin' => 'skip_on_empty',
            'method' => 'row',
          ]);
        }
      }
    
Production build 0.71.5 2024