When migrating content and their related content types from D6 to D8, the various field's weights as they are in D6 do not get migrated.

Here are the various changes from D6 to D8 for the field weights of a content type:

  • In the Manage display tab:
    • In the Default sub-tab:
      • All the fields are disabled.
      • The fields are not shown in their correct order.
      • Their weights are all set to 0.
    • In the Full, RSS, and Teaser sub-tabs:
      • All the fields are enabled.
      • The fields are not shown in their correct order.
      • Their weights are set, but they are set to the wrong values. It may be that the weight values are assigned to the wrong fields.

    (Some or all of the above may or may not be fixed and/or related to #2278613: Body text display is blank for migrated content types.)

  • In the Manage form display tab:
    • The fields are not shown in their correct order.
    • None of the fields have their original D6 weights. The weight numbers start with the weight of the last field +1.
  • In the Manage fields tab:
    • The fields are shown in their correct order.
    • The weights are not shown, and so I don't know if they are correct, but I assume so, because all the above items were not in the correct order and did not have the correct weights.

It is possible that some or all of this might be fixed with #2262275: D6->D8 CCK Single On/Off Checkbox, Checkboxes/Radio buttons, and Select formatters.

CommentFileSizeAuthor
#7 interdiff.txt2.55 KBbenjy
#7 2281697-7.patch3.62 KBbenjy
#1 field-weights-are-not-migrated-2281697-1.patch1.86 KBAnonymous (not verified)

Comments

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new1.86 KB

Here is a patch that changes the sort order of the migration query. It works for the "Manage form display" tab so for content editors it may solve this issue. The weights all reflected the same values as D6 in my (somewhat limited) testing.

The other referenced issue in the description will probably be needed for the "Manage display" tab as currently all of my fields are set to disabled there.

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch, 1: field-weights-are-not-migrated-2281697-1.patch, failed testing.

ultimike’s picture

I just retested Ryan's patch from comment 1 and it still applies cleanly. Looking at the test results, I'm not sure FieldInstancePerViewModeTest still exists, so I submitted the test to be re-run.

Thanks,
-mike

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: field-weights-are-not-migrated-2281697-1.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review
StatusFileSize
new3.62 KB
new2.55 KB

Fixed the unit test and a few bugs in the sources relating to weight. Not sure if we want to do it here or in a follow-up but FieldInstancePerFormDisplay could do with a unit test.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for fixing this. Please file a followup for the unit test.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Good catch. Thanks for testing the D8 migration path! :)

Committed and pushed to 8.x. Thanks!

  • webchick committed 8f4a89d on 8.0.x
    Issue #2281697 by benjy, Ryan Weal, oadaeh: Fixed Field weights are not...

Status: Fixed » Closed (fixed)

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