Commit f86fa92
* Fix: move property out of group on import (#1009)
Importing a content type where a property has been moved out of all
groups (empty <Tab> and no matching <Tabs> entry) did nothing - the
property stayed in its original group.
DeserializePropertiesAsync only handled properties moving *into* a tab.
When the tab alias resolved to empty for an existing property, the else
branch fell through without action.
Now, when an existing property has no tab in the config but is still in a
group, it is queued to move to "no group" via MovePropertyType(alias,
null), which Umbraco treats as removing it from its current group.
* Fix: re-home property into no-group so move persists in one import (#1009)
Moving a property out of all groups still needed two imports. Root cause:
Umbraco's MovePropertyType(alias, null) removes the property from its
group but does NOT add it to the 'no group' collection - it orphans the
property, so the first import's save doesn't persist the move.
MoveProperties now re-adds the property with AddPropertyType after the
move to null, which lands it in NoGroupPropertyTypes. Added unit tests
documenting the orphaning behaviour and verifying the workaround.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c9c2a7a commit f86fa92
2 files changed
Lines changed: 109 additions & 4 deletions
File tree
- uSync.Core/Serialization/Serializers
- uSync.Tests/Serializers
Lines changed: 29 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
| 426 | + | |
426 | 427 | | |
427 | 428 | | |
428 | 429 | | |
| |||
567 | 568 | | |
568 | 569 | | |
569 | 570 | | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
570 | 580 | | |
571 | 581 | | |
572 | 582 | | |
| |||
1216 | 1226 | | |
1217 | 1227 | | |
1218 | 1228 | | |
1219 | | - | |
| 1229 | + | |
1220 | 1230 | | |
1221 | 1231 | | |
1222 | 1232 | | |
1223 | | - | |
1224 | | - | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1225 | 1250 | | |
1226 | 1251 | | |
1227 | 1252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
0 commit comments