Problem/Motivation

Custom view modes are not migrating from D7 to D8, only those whose label is mapped in the migration template (e.g.default, full, teaser, etc).

Proposed resolution

The plugin for migrating the label is missing the bypass field from it's configuration (as it is in the mode migration).

Remaining tasks

Add bypass to the plugin for migrating label.

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jo Fitzgerald created an issue. See original summary.

jofitz’s picture

Status: Active » Needs review
Issue tags: +migrate-d7-d8
FileSize
471 bytes

Add bypass to the plugin for migrating label of view modes.

benjy’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests
jofitz’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
4.92 KB
5.38 KB

Added tests.

Status: Needs review » Needs work

The last submitted patch, 4: custom_view_modes_not_migrating-2706187-4.patch, failed testing.

jofitz’s picture

Status: Needs work » Needs review
FileSize
668 bytes
6.04 KB

Resolve test failures.

kevinquillen’s picture

Still getting this error after applying the patch.

a:5:{s:5:"%type";s:5:"Error";s:8:"@message";s:59:"Call to a member function getConfigDependencyName() on null";s:9:"%function";s:61:"Drupal\Core\Entity\EntityDisplayBase->calculateDependencies()";s:5:"%file";s:66:"/var/www/docroot/core/lib/Drupal/Core/Entity/EntityDisplayBase.php";s:5:"%line";i:274;}

kevinquillen’s picture

After reinstalling and reapplying the patch, it now works. I was able to migrate from D7 to D8 with everything (within reason) intact.

kevinquillen’s picture

Status: Needs review » Reviewed & tested by the community

Looks like this resolves the issue and my custom view modes and settings are retained from the D7 to D8 assisted upgrade. I did the migration 3 times and the result was consistent.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 6: custom_view_modes_not_migrating-2706187-6.patch, failed testing.

jofitz’s picture

Status: Needs work » Reviewed & tested by the community

Latest patch now passes tests again, suspect there may have been an issue with the testbot.

Re-setting to RTBC.

alexpott’s picture

Uploading a test only patch to ensure the expected tests fail. The -12.patch is a copy of the patch in #6

The last submitted patch, 12: 2706187-12.test-only.patch, failed testing.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed b83e2d78a616b6d85d275ad371fa7c6e9fc3b901 to 8.2.x and 7891569 to 8.1.x. Thanks!

The expected tests failed in #12 - nice work!

  • alexpott committed b83e2d7 on 8.2.x
    Issue #2706187 by Jo Fitzgerald: Custom view modes not migrating from d7...

  • alexpott committed b83e2d7 on 8.3.x
    Issue #2706187 by Jo Fitzgerald: Custom view modes not migrating from d7...

  • alexpott committed b83e2d7 on 8.3.x
    Issue #2706187 by Jo Fitzgerald: Custom view modes not migrating from d7...

Status: Fixed » Closed (fixed)

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