Skip to content

Commit 74713d1

Browse files
akoclaude
andcommitted
fix: clear imageObject default and use correct Parameters version marker
Two fixes for CE0463 on Image widgets with modified properties: 1. Clear imageObject.Image in the template — the extraction captured a non-default value ("Atlas_Web_Content.Content.user") from the source widget. Widgets created from this template inherited an image binding that didn't match their actual configuration. 2. Use Parameters version marker [2] (not [3]) when opTextTemplate creates a new TextTemplate from scratch. Studio Pro expects [2] for empty parameter arrays in ClientTemplate objects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 27dd6c4 commit 74713d1

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

mdl/executor/widget_engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func setTextTemplateValue(val bson.D, text string) bson.D {
236236
{Key: "$Type", Value: "Texts$Text"},
237237
{Key: "Items", Value: bson.A{int32(3)}},
238238
}},
239-
{Key: "Parameters", Value: bson.A{int32(3)}},
239+
{Key: "Parameters", Value: bson.A{int32(2)}},
240240
{Key: "Template", Value: bson.D{
241241
{Key: "$ID", Value: mpr.IDToBsonBinary(mpr.GenerateID())},
242242
{Key: "$Type", Value: "Texts$Text"},

sdk/widgets/templates/mendix-11.6/image.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"Expression": "",
6161
"Form": "",
6262
"Icon": null,
63-
"Image": "Atlas_Web_Content.Content.user",
63+
"Image": "",
6464
"Microflow": "",
6565
"Nanoflow": "",
6666
"Objects": [
@@ -1337,7 +1337,7 @@
13371337
{
13381338
"$ID": "6f547135d200034bb5d167f9958536a7",
13391339
"$Type": "CustomWidgets$WidgetPropertyType",
1340-
"Caption": "\u003csystem:Name\u003e",
1340+
"Caption": "<system:Name>",
13411341
"Category": "General::Conditional Visibility",
13421342
"Description": "",
13431343
"IsDefault": false,
@@ -1388,7 +1388,7 @@
13881388
{
13891389
"$ID": "7c043cb9ab7b7f4da53e330b429963f0",
13901390
"$Type": "CustomWidgets$WidgetPropertyType",
1391-
"Caption": "\u003csystem:Visibility\u003e",
1391+
"Caption": "<system:Visibility>",
13921392
"Category": "General::Conditional Visibility",
13931393
"Description": "",
13941394
"IsDefault": false,
@@ -2102,8 +2102,8 @@
21022102
]
21032103
},
21042104
"OfflineCapable": true,
2105-
"StudioCategory": "Images, Videos \u0026 Files",
2106-
"StudioProCategory": "Images, videos \u0026 files",
2105+
"StudioCategory": "Images, Videos & Files",
2106+
"StudioProCategory": "Images, videos & files",
21072107
"SupportedPlatform": "Web",
21082108
"WidgetDescription": "Display an image and enlarge it on click.",
21092109
"WidgetId": "com.mendix.widget.web.image.Image",
@@ -2113,4 +2113,4 @@
21132113
},
21142114
"version": "11.8.0",
21152115
"widgetId": "com.mendix.widget.web.image.Image"
2116-
}
2116+
}

0 commit comments

Comments
 (0)