Migrated filters may have invalid/incomplete settings applied

Created on 24 August 2020, about 4 years ago
Updated 20 September 2024, 9 days ago

Problem/Motivation

For example, the https://www.drupal.org/project/media_migration β†’ module ensures the media_filter filter in D7 gets mapped to the media_embed filter in D8/9.

But:

  1. The D7 media_filter filter did not have any settings.
  2. The D8/9 media_embed filter does have settings, and specifies some defaults because of that.
  3. The D8/9 media_embed filter implements calculateDependencies() to ensure any Text Format that uses this filter also has the appropriate config dependencies. In this logic, it inspects the settings.
  4. When those settings are not specified (which they should be given they're in the default settings in the filter plugin annotation), this triggers a fatal error: Error: Unsupported operand types in Drupal\media\Plugin\Filter\MediaEmbed->calculateDependencies() (line 523 of /Users/wim.leers/Work/d8/core/modules/media/src/Plugin/Filter/MediaEmbed.php)

Steps to reproduce

Proposed resolution

Harden \Drupal\filter\Plugin\migrate\process\FilterSettings::transform(), beyond what πŸ› Missing migration filters that are replaced with filter_null may have invalid settings applied Fixed already did.

Remaining tasks

Tests

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TBD

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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.

Production build 0.71.5 2024