- 🇪🇸Spain pcambra Asturies
Moving my comment from the other issue.
Thanks for this module, it's saved me a lot of time.
Just to add to this discussion, I've used themedia_wysiwyg_filter
standalone in a custom migration and had to alter the plugins to stop depending ond7_file_plain:image:public
andd7_file_entity:image:public
which I don't use, like so:/** * Implements hook_migration_plugins_alter(). */ function my_module_migration_plugins_alter(array &$migrations) { $migration_ids = [ 'upgrade_d7_node_complete_article', 'upgrade_d7_node_complete_page', ]; $dependencies_to_remove = [ 'd7_file_plain:image:public', 'd7_file_entity:image:public', ]; foreach ($migration_ids as $migration_id) { $dependencies = $migrations[$migration_id]['migration_dependencies']; $dependencies['required'] = array_diff($dependencies['required'], $dependencies_to_remove); $migrations[$migration_id]['migration_dependencies'] = $dependencies; } }
Then used the process plugin normally on the migration:
body/value: - plugin: get source: body/0/value - plugin: media_wysiwyg_filter view_mode_matching: default: full media_migrations: - upgrade_d7_media_images file_migrations: - upgrade_d7_file
Worth saying that I had much better results in terms of visualization with entity embed than media embed, but the transformation worked very well.
- 🇪🇸Spain pcambra Asturies
I've found that using the
media_wysiwyg_filter
standalone makes all the migrations super super slow due to something that is ran inmedia_migration_migration_plugins_alter
, so I needed to remove the alter hooks:/** * Implements hook_module_implements_alter(). */ function my_module_module_implements_alter(&$implementations, $hook) { if ($hook == 'migration_plugins_alter' && isset($implementations['media_migration'])) { unset($implementations['media_migration']); unset($implementations['media_migration_tools']); } }
Wondering if it would be worth spinning off the media_wysiwyg_filter as a standalone and composer require it from this one?
- 🇮🇹Italy apaderno Brescia, 🇮🇹
(I am removing a tag, since tags should not duplicate what already selected for the Component field. I apologize for bumping this issue.)