Running a D7 to D8.9.1 migration using migrate_upgrade, the initial configuration migration runs fine but when I run the migrate:import command it hits this error:

[error] The "" plugin does not exist. Valid plugin IDs for Drupal\filter\FilterPluginManager are: editor_file_reference, filter_html_image_secure, filter_url, filter_null, filter_html, filter_autop, filter_align, filter_caption, filter_htmlcorrector, filter_html_escape, media_embed (/var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:53)
[error] The "" plugin does not exist. Valid plugin IDs for Drupal\filter\FilterPluginManager are: editor_file_reference, filter_html_image_secure, filter_url, filter_null, filter_html, filter_autop, filter_align, filter_caption, filter_htmlcorrector, filter_html_escape, media_embed (/var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:53)
[notice] Processed 3 items (1 created, 0 updated, 2 failed, 0 ignored) - done with 'd7_filter_format'

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

After some debugging it turned out that the Pathologic module's filter wasn't identified properly, in Drupal\filter\Entity\FilterFormat::filters() its structure ends up like this:

    [] => Array
        (
            [settings] => Array
                (
                    [local_paths] => 
                    [protocol_style] => full
                )

            [status] => 1
            [weight] => 50
        )

Note: the Pathologic module is not installed in the D8 codebase, so this should be converted to filter_null.

damienmckenna’s picture

From the backtrace:

 [error]  Array(
    [file] => /var/www/html/web/core/modules/migrate/src/MigrateExecutable.php
    [line] => 226
    [function] => import
    [class] => Drupal\migrate\Plugin\migrate\destination\EntityConfigBase
    [type] => ->
    [args] => Array(
            [0] => Drupal\migrate\Row Object(
                    [source:protected] => Array(
                            [format] => full_html
                            [name] => Full HTML
                            [cache] => 1
                            [status] => 1
                            [weight] => -10
                            [plugin] => d7_filter_format
                            [filters] => Array(
                                    [filter_autop] => Array(
                                            [format] => full_html
                                            [module] => filter
                                            [name] => filter_autop
                                            [weight] => -47
                                            [status] => 1
                                            [settings] => Array(
                                                )
                                        )
                                    [filter_htmlcorrector] => Array(
                                            [format] => full_html
                                            [module] => filter
                                            [name] => filter_htmlcorrector
                                            [weight] => -45
                                            [status] => 1
                                            [settings] => Array(
                                                )
                                        )
                                    [filter_url] => Array(
                                            [format] => full_html
                                            [module] => filter
                                            [name] => filter_url
                                            [weight] => -44
                                            [status] => 1
                                            [settings] => Array(
                                                    [filter_url_length] => 72
                                                )
                                        )
                                    [media_filter] => Array(
                                            [format] => full_html
                                            [module] => media_wysiwyg
                                            [name] => media_filter
                                            [weight] => -46
                                            [status] => 1
                                            [settings] => Array(
                                                )
                                        )
                                    [pathologic] => Array(
                                            [format] => full_html
                                            [module] => pathologic
                                            [name] => pathologic
                                            [weight] => -43
                                            [status] => 1
                                            [settings] => Array(
                                                    [local_paths] => 
                                                    [protocol_style] => path
                                                    [local_paths_exploded] => Array(
                                                            [0] => Array(
                                                                    [path] => /
                                                                )
                                                            [1] => Array(
                                                                    [path] => /
                                                                    [host] => www.example.com
                                                                )
                                                        )
                                                    [base_url_host] => www.example.com
                                                )
                                        )
                                )
                        )
                    [sourceIds:protected] => Array(
                            [format] => Array(
                                    [type] => string
                                )
                        )
                    [destination:protected] => Array(
                            [format] => full_html
                            [status] => 1
                            [name] => Full HTML
                            [cache] => 1
                            [weight] => -10
                            [filters] => Array(
                                    [filter_autop] => Array(
                                            [id] => filter_autop
                                            [settings] => Array(
                                                )
                                            [status] => 1
                                            [weight] => -47
                                        )
                                    [filter_htmlcorrector] => Array(
                                            [id] => filter_htmlcorrector
                                            [settings] => Array(
                                                )
                                            [status] => 1
                                            [weight] => -45
                                        )
                                    [filter_url] => Array(
                                            [id] => filter_url
                                            [settings] => Array(
                                                    [filter_url_length] => 72
                                                )
                                            [status] => 1
                                            [weight] => -44
                                        )
                                    [media_embed] => Array(
                                            [id] => media_embed
                                            [settings] => Array(
                                                )
                                            [status] => 1
                                            [weight] => -46
                                        )
                                    [] => Array(
                                            [settings] => Array(
                                                    [local_paths] => 
                                                    [protocol_style] => path
                                                    [local_paths_exploded] => Array(
                                                            [0] => Array(
                                                                    [path] => /
                                                                )
                                                            [1] => Array(
                                                                    [path] => /
                                                                    [host] => www.example.com
                                                                )
                                                        )
                                                    [base_url_host] => www.example.com
                                                )
                                            [status] => 1
                                            [weight] => -43
                                        )
                                )
                        )
                    [idMap:protected] => Array(
                            [original_hash] => 
                            [hash] => 
                            [source_row_status] => 1
                        )
                    [frozen:protected] => 1
                    [rawDestination:protected] => Array(
                            [format] => full_html
                            [status] => 1
                            [name] => Full HTML
                            [cache] => 1
                            [weight] => -10
                            [filters] => Array(
                                    [filter_autop] => Array(
                                            [id] => filter_autop
                                            [settings] => Array(
                                                )
                                            [status] => 1
                                            [weight] => -47
                                        )
                                    [filter_htmlcorrector] => Array(
                                            [id] => filter_htmlcorrector
                                            [settings] => Array(
                                                )
                                            [status] => 1
                                            [weight] => -45
                                        )
                                    [filter_url] => Array(
                                            [id] => filter_url
                                            [settings] => Array(
                                                    [filter_url_length] => 72
                                                )
                                            [status] => 1
                                            [weight] => -44
                                        )
                                    [media_embed] => Array(
                                            [id] => media_embed
                                            [settings] => Array(
                                                )
                                            [status] => 1
                                            [weight] => -46
                                        )
                                    [] => Array(
                                            [settings] => Array(
                                                    [local_paths] => 
                                                    [protocol_style] => path
                                                    [local_paths_exploded] => Array(
                                                            [0] => Array(
                                                                    [path] => /
                                                                )
                                                            [1] => Array(
                                                                    [path] => /
                                                                    [host] => www.example.com
                                                                )
                                                        )
                                                    [base_url_host] => www.example.com
                                                )
                                            [status] => 1
                                            [weight] => -43
                                        )
                                )
                        )
                    [isStub:protected] => 
                    [emptyDestinationProperties:protected] => Array(
                        )
                )
            [1] => Array(
                )
        )
)
 (/var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:57) 
damienmckenna’s picture

So somehow it's going from importing the data with the correct values to saving them with the wrong values.

quietone’s picture

I think this is a duplicate of #3126063: Harden SubProcess process plugin.

@DamienMcKenna, what do you think?

damienmckenna’s picture

Status: Active » Closed (duplicate)
Parent issue: » #3126063: Harden SubProcess process plugin

Yes! Thank you.

Christopher Riley’s picture

Should this patch work with 9.2.0 as well?