Migrate view modes into entity.view_mode.*.*.yml

CommentFileSizeAuthor
#4 2170033_4.patch6.62 KBbenjy
#2 2170033_2.patch4.63 KBbenjy

Comments

benjy’s picture

Title: View mode migrations » View mode migration source needs test

Once #2155801: Migrate D6 field formatter settings lands we should split the view mode source out into it's own source and add a unit test.

benjy’s picture

StatusFileSize
new4.63 KB

Just uploading this so I don't lose it.

It will fail until #2169999: Allow for entity updates during migrations get's in and it needs a unit test for the source.

chx’s picture

Project: Drupal core » IMP
Version: 8.x-dev »
Component: migration system » Code
Status: Active » Needs review
benjy’s picture

StatusFileSize
new6.62 KB

This may still needs some work over at #2166487: Refactor FieldInstancePerFormDisplay and FieldInstancePerViewMode to have a base class since we have a bit of duplication but for now here is a working simplified source for view modes and a unit test.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Before commit could you please turn

+ 'display_settings' => 'a:6:{

into a serialize(array(? And rerun the unit tests, they are fast. Yes this is usually not how the dump classes look but the dump classes ideally are created from a live D6 database with the dump script (ideally...) and so serialized strings there come more naturally than here.

benjy’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x

benjy’s picture

Assigned: benjy » Unassigned

Status: Fixed » Closed (fixed)

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