Block Grid Settings values (cssClasses/customCSS) not migrated to new values array after 13→17 upgrade

Upgrading Umbraco 13.10.1 → 17.5.3. After migration, some Block Grid Settings fields (e.g. “CSS Classes”, “Custom CSS”) show empty in the back office, even though the old data is still in the DB — just in the wrong shape.

v13 (before):

"settingsData": [{
  "contentTypeKey": "9860e8fc-2346-42d6-a70c-cd8f7be0609f",
  "udi": "umb://element/90859e4cd6294483b2c1f3a6c757b634",
  "cssClasses": "text-xl",
  "backgroundImage": "[]",
  "blockID": null,
  "customCSS": null
}]

v17 as-migrated (actual, broken):

"settingsData": [{
  "contentTypeKey": "9860e8fc-2346-42d6-a70c-cd8f7be0609f",
  "key": "90859e4c-d629-4483-b2c1-f3a6c757b634",
  "values": [],
  "cssClasses": "text-xl",
  "backgroundImage": "[]",
  "blockID": null,
  "customCSS": null
}]

udi was converted to key and the new values container was added, but cssClasses (and the other settings) were left behind in their old flat fields instead of being moved into values. The editor only reads from values, so the field shows blank/lost even though "text-xl" is sitting right there.

v17 expected shape:

"settingsData": [{
  "contentTypeKey": "9860e8fc-2346-42d6-a70c-cd8f7be0609f",
  "key": "90859e4c-d629-4483-b2c1-f3a6c757b634",
  "values": [
    {"editorAlias": "Umbraco.TextBox", "culture": null, "segment": null, "alias": "cssClasses", "value": "text-xl"}
  ],
  "cssClasses": "text-xl",
  "backgroundImage": "[]",
  "blockID": null,
  "customCSS": null
}]

(We reconstructed this “expected” shape by editing the same block by hand in v17 and checking what Umbraco itself writes — it keeps the old flat fields in place untouched, but the only thing actually read is the matching entry in values.)

Questions:

  • Has anyone else seen this or is there a fix Available?

Hi @apples6509

I’ve not experienced this myself, but in my opinion Umbraco should be migrating this cleanly between versions, so if it isn’t then it’s worth raising this on the issue tracker. There are already reported gaps in the migration of Block Grid data (Settings especially), and there’s a similar one for RTE blocks not migrating consistently on 13->17 (#21204). You’ve already got good before/after JSON in this thread - write that up with reproducible steps and it’ll help them fix the problem.

In the meantime, since you’ve identified the root cause and worked out the correct format, you could write your own migration to fix the JSON as an interim measure.

Justin

thanks for the response, i did indeed write up bug for this and looks like someone is already working on it here: Migrations: Migrate settings values for block editors when a block has no content values (closes #23392) - Pull Request #23404 - umbraco/Umbraco-CMS - GitHub

Hi @apples6509

That’s great, thank you for doing that - hopefully they will get a fix out soon so you (and others’) can benefit from it. This is exactly why I love this community!

Justin