Problem/Motivation

Per https://www.drupal.org/project/multiupload_filefield_widget this plugin has been added to D8, but the migration is failing and cause a broken site.

The "file_mfw" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\WidgetPluginManager are: comment_default, datetime_datelist, datetime_default, file_generic, image_image, link_default, path, redirect_source, text_textarea, text_textarea_with_summary, text_textfield, datetime_timestamp, boolean_checkbox, email_default, entity_reference_autocomplete_tags, entity_reference_autocomplete, language_select, number, options_buttons, options_select, string_textarea, string_textfield, uri (core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php:53)

Per https://www.drupal.org/project/multiupload_imagefield_widget this plugin has also been added to D8, but the migration is failing and cause a broken site.

The "image_miw" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\WidgetPluginManager are: comment_default, datetime_datelist, datetime_default, file_generic, image_image, link_default, path, redirect_source, text_textarea, text_textarea_with_summary, text_textfield, datetime_timestamp, boolean_checkbox, email_default, entity_reference_autocomplete_tags, entity_reference_autocomplete, language_select, number, options_buttons, options_select, string_textarea, string_textfield, uri (core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php:53)

Are there any patches to solve this migration bugs or ongoing tasks to fix this bugs?

Proposed resolution

Write a migration :-)

Remaining tasks

Review
Commit

Comments

hass created an issue. See original summary.

hass’s picture

Issue summary: View changes
nchase’s picture

Same problem here:

The "file_mfw" plugin does not exist. Valid plugin IDs for Drupal\Core\Field\WidgetPluginManager are: comment_default, datetime_default, datetime_datelist, entity_reference_revisions_autocomplete, field_collection_embed, file_generic, image_image, link_default, oembed_textfield, metatag_firehose, panelizer, path, redirect_source, text_textarea_with_summary, text_textarea, text_textfield, entity_reference_paragraphs, paragraphs, datetime_timestamp, uri, number, boolean_checkbox, email_default, language_select, string_textarea, entity_reference_autocomplete_tags, options_buttons, string_textfield, entity_reference_autocomplete, options_select (/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:53)

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.9 was released on November 6 and is the final full bugfix release for the Drupal 8.7.x series. Drupal 8.7.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.8.0 on December 4, 2019. (Drupal 8.8.0-beta1 is available for testing.)

Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

nojj’s picture

I have the same problem trying to upgrade to Drupal 9.0.7. is there any solution ?

quietone’s picture

Version: 8.9.x-dev » 9.2.x-dev
StatusFileSize
new1.07 KB

Maybe something like this.

This will need tests and it would help greatly if someone uploaded a file with a database row for each plugin from field_config and field_config_instance. That would be 4 rows in total, then I can write the tests.

quietone’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 7: 3051252-7.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new10.99 KB

Starting over. This adds the field plugin, adds the fields to the d7 fixture and add tests.

Status: Needs review » Needs work

The last submitted patch, 10: 3051252-10.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
StatusFileSize
new12.19 KB
new23.1 KB

Forgot to add the field data tables to the fixture.

nojj’s picture

is this patch only for D9.2 ?

quietone’s picture

Category: Bug report » Task
Parent issue: » #2456259: [META] Drupal 7 to Drupal 8 Migration path

@nojj, yes, it is. Bugs are fixed on the latest development version and then considered for backporting to earlier versions.

This is actually a task as are all the migrations for legacy functionality that is now in Drupal 8 core. And adding to the relevant Meta.

wim leers’s picture

Woah, nice catch!

This patch looks great to me.

+++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php
@@ -215,6 +215,14 @@ public function addAllFieldProcessesAltersData() {
                   'entityreference_entity_view' => 'entity_reference_entity_view',
                 ],
+                'file' => [
+                  'default' => 'file_default',
+                  'url_plain' => 'file_url_plain',
+                  'path_plain' => 'file_url_plain',
+                  'image_plain' => 'image',
+                  'image_nodelink' => 'image',
+                  'image_imagelink' => 'image',
+                ],
                 'email' => [
                   'email_formatter_default' => 'email_mailto',
                   'email_formatter_contact' => 'basic_string',
@@ -231,14 +239,6 @@ public function addAllFieldProcessesAltersData() {

@@ -231,14 +239,6 @@ public function addAllFieldProcessesAltersData() {
                 'datetime' => [
                   'date_default' => 'datetime_default',
                 ],
-                'file' => [
-                  'default' => 'file_default',
-                  'url_plain' => 'file_url_plain',
-                  'path_plain' => 'file_url_plain',
-                  'image_plain' => 'image',
-                  'image_nodelink' => 'image',
-                  'image_imagelink' => 'image',
-                ],
               ],
             ],
           ],
@@ -253,16 +253,16 @@ public function addAllFieldProcessesAltersData() {

@@ -253,16 +253,16 @@ public function addAllFieldProcessesAltersData() {
                 'd7_text' => 'd7_text_default',
                 'number_default' => 'number_default_default',
                 'taxonomy_term_reference' => 'taxonomy_term_reference_default',
-                'image' => 'image_default',
+                'image_miw' => 'image_image',
                 'link_field' => 'link_default',
                 'entityreference' => 'entityreference_default',
                 'list' => 'list_default',
+                'file_mfw' => 'file_generic',
                 'email_textfield' => 'email_default',
                 'phone' => 'phone_default',
                 'date' => 'datetime_default',
                 'datetime' => 'datetime_default',
                 'datestamp' => 'datetime_timestamp',
-                'filefield_widget' => 'file_generic',
               ],
             ],
           ],

🤔 These changes I don't quite understand. I do understand the image_miw and file_miw additions. I do not understand any of the other changes.

quietone’s picture

StatusFileSize
new1.85 KB
new23.19 KB

15.1 I have not investigated but the order of the fields as tested in FieldDiscoveryTest changes when field plugins are added.

Yes, I mucked up the widget maps. This should be better.

edit: s/investigate/investigated

wim leers’s picture

That looks better! 👍

P.S.: Would appreciate your guidance on #3188284: [PP-3] Migration support 😊

quietone’s picture

Retesting

nojj’s picture

how can I solve this problem in Drupal 9.1.2 ?

quietone’s picture

@nojj, Use the patch in #16, it applies to 9.1.2.

quietone’s picture

StatusFileSize
new2.94 KB
new23.35 KB

Needed a reroll

quietone’s picture

Issue summary: View changes
quietone’s picture

Title: Plugins file_mfw and image_miw not migrated » Upgrade path for Multiupload Filefield Widget and Multiupload Imagefield Widget
quietone’s picture

StatusFileSize
new4.76 KB
new23.7 KB

Yet another reroll.

matroskeen’s picture

StatusFileSize
new55.96 KB

@quietone asked me to review this issue as a review swap, so here we go:
1) I had D7 project running so it took me a relatively short time to install those two modules and configure field widgets for Image and File fields;
2) I exported a database dump and ran the Upgrade (provide by Migrate Drupal UI) and hit the same issues reported in the issue summary;
3) After applying the patch, these errors were gone and the migrated fields had Image and File widgets 🙌

I have to mention that in both cases (before and after the patch), the Upgrade summary page displayed the following warnings:
upgrade summary

Should we add some records to migrate_drupal.migrate_drupal.yml file about the migration status?

quietone’s picture

StatusFileSize
new3.87 KB
new27.96 KB

@Matroskeen, thank you for the review.

Great news to know that the patch passed manual testing!

Good point, yes, I completely forgot the review page tests. This patch adds entries in the source fixture to enable the two multiupload modules and then adjusts the tests as needed.

quietone’s picture

StatusFileSize
new577 bytes
new28.01 KB

Oops, missed a spelling error. Added a cSpell disable/enable to prevent the errors. I suppose 'Multiupload' could be added to the dictionary but this is the only occurrence, so the disable/enable seems like the right thing to do.

quietone’s picture

StatusFileSize
new2.55 KB
new28.9 KB

More fixes for spelling. Seems I haven't properly ingrained running commit-code-check.

matroskeen’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +migrate-d7-d8

I tested again with the last patch and confirm it's working properly: widget settings are migrated and there are no warnings on the review page.
The patch looks good to me and the testbot is happy.

Thanks!

quietone’s picture

@Matroskeen, Thanks!

  • catch committed 21f096a on 9.2.x
    Issue #3051252 by quietone, Matroskeen, Wim Leers: Upgrade path for...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.2.x.

This doesn't apply to 9.1.x - I'm marking fixed, but if someone wants to backport the patch, please re-open with the backport.

quietone’s picture

Great! This is the last issue in the Meta #2456259: [META] Drupal 7 to Drupal 8 Migration path.

wim leers’s picture

Woah, congrats, @quietone! 👏

WHAT AN ACHIEVEMENT!!!!!!!! 🥳🥳🥳🥳🙏🙏🙏

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

webchick’s picture

Wow, I somehow missed this fact! AMAZING!!! 🥳

quietone’s picture

Issue tags: -multiupload_filefield_widget, -multiupload_imagefield_widget