If you set a taxonomy field in Drupal 7 to use the Rendered Entity field formatter in a display mode, like this:

And then you attempt to migrate that to Drupal 8 with the following commands:

composer require drupal/migrate_tools:4.x-dev drupal/migrate_upgrade:3.x-dev drupal/migrate_plus:4.x-dev
drush en -y migrate_tools,migrate_upgrade,migrate_plus
drush migrate:upgrade --legacy-db-key=drupal7 --legacy-root=/var/www/drupal/drupal7 --configure-only
drush -v migrate:import --execute-dependencies --tag=Configuration

Then the field formatter settings migration fails with the following error:

 [error]  The "entityreference_entity_view" plugin does not exist. (/var/www/drupal/drupal8/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php:52) 
 [notice] Processed 10 items (9 created, 0 updated, 1 failed, 0 ignored) - done with 'upgrade_d7_field_formatter_settings'
 [error]  upgrade_d7_field_formatter_settings Migration - 1 failed. 

This happens because the Entity Reference module in Drupal 7 adds the Rendered Entity field formatter for both Entity Reference and Taxonomy Reference fields:

However, the Taxonomy Term Reference migrate plugin does not map the formatter:

Comments

juampynr created an issue. See original summary.

juampynr’s picture

Status: Active » Needs review
StatusFileSize
new633 bytes

Here is a patch that fixes it.

juampynr’s picture

Issue tags: +migrate

Adding migrate tag.

heddn’s picture

Status: Needs review » Needs work
Issue tags: -migrate +Needs tests

Great find. I think this needs tests. We obviously have a scenario that wasn't caught with our existing test coverage.

deviantintegral’s picture

Version: 8.6.x-dev » 8.7.x-dev
StatusFileSize
new709 bytes

Straight reroll against 8.7.x.

juampynr’s picture

Here is a test only patch and a full patch with the fix.

juampynr’s picture

Issue tags: -Needs tests
juampynr’s picture

Issue tags: +migrate
quietone’s picture

StatusFileSize
new4.17 KB
new2.42 KB

@juampynr, thanks. Thinks for great and is fine by me.

I've decided to add a migration test of the change as well.

heddn’s picture

Status: Needs review » Reviewed & tested by the community

We got us a test now! Otherwise, a pretty easy bug fix here.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 1dedf03eb3 to 8.8.x and 5a9275b369 to 8.7.x. Thanks!

  • alexpott committed 1dedf03 on 8.8.x
    Issue #2993927 by juampynr, quietone, deviantintegral: Taxonomy Term...

  • alexpott committed 5a9275b on 8.7.x
    Issue #2993927 by juampynr, quietone, deviantintegral: Taxonomy Term...

Status: Fixed » Closed (fixed)

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