Commit 8ead1cf
fix: unique placeholder IDs for TextTemplate translations + rename #30 fixture
CI integration test (TestMxCheck_DoctypeScripts) caught two regressions
from this session's CE0463 work that local unit tests didn't surface:
1. Duplicate \$ID on TextTemplate translations (real bug)
Commit f9818394 (TextTemplate translation defaults) bulk-edited 4
embedded templates to add Texts\$Translation entries inside
WidgetValue.TextTemplate.Template.Items. The script used a literal
placeholder \$ID of '00000000000000000000000000000000' for ALL added
entries. When a project has multiple instances of a widget on one
page (e.g. two textfilters in two columns), the embedded template's
collectIDs remapping treats same-string \$IDs as the same logical
entity and remaps them to one new UUID — producing duplicate GUIDs
across widget instances:
mx update-widgets ERROR:
Duplicate Guid in unit page 'CWTest.P_Gallery_Filtered'.
Object types: Mendix.Modeler.Texts.Translation,
Mendix.Modeler.Texts.Translation.
Studio Pro then fails to reload the project ("Root unit not found").
Fix: remapped 10 duplicate placeholder \$IDs across the 4 templates
to follow the existing placeholderID() convention (aa00...XXXXXX with
a unique counter per entry). The remapping logic in
sdk/widgets/loader.go now sees each entry as a distinct entity and
generates unique UUIDs per instance.
Affected templates:
combobox.json 2 entries
datagrid-dropdown-filter.json 2 entries
datagrid-number-filter.json 3 entries
datagrid-text-filter.json 3 entries
2. Rename 30-pluggable-widget-examples.mdl → .test.mdl
Script #30 references pluggable widgets (Badge, ProgressBar, Tooltip,
Accordion, Timeline, Maps, TreeNode, PopupMenu, etc.) that aren't
built-in and require their .mpk files in the project's widgets/
folder + mxcli widget init. The integration test creates a blank
project that doesn't have them; \`mxcli exec\` failed with
"no definition for widget com.mendix.widget.custom.badge.Badge".
Renamed to .test.mdl so the integration test skips it (matches the
convention used by other unrunnable-in-blank-project syntax
references like #32). Added a header note explaining the rationale.
Verified: TestMxCheck_DoctypeScripts now passes (150s) with the same
build flags CI uses.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e8b2173 commit 8ead1cf
5 files changed
Lines changed: 17 additions & 10 deletions
File tree
- mdl-examples/doctype-tests
- sdk/widgets/templates/mendix-11.6
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
1211 | | - | |
| 1211 | + | |
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
| 1217 | + | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2158 | 2158 | | |
2159 | 2159 | | |
2160 | 2160 | | |
2161 | | - | |
| 2161 | + | |
2162 | 2162 | | |
2163 | 2163 | | |
2164 | 2164 | | |
2165 | 2165 | | |
2166 | 2166 | | |
2167 | | - | |
| 2167 | + | |
2168 | 2168 | | |
2169 | 2169 | | |
2170 | 2170 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | | - | |
| 1295 | + | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | | - | |
| 1301 | + | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
| |||
0 commit comments