@@ -227,30 +227,12 @@ func setTextTemplateValue(val bson.D, text string) bson.D {
227227 if tmpl , ok := elem .Value .(bson.D ); ok && tmpl != nil {
228228 result = append (result , bson.E {Key : "TextTemplate" , Value : updateTemplateText (tmpl , text )})
229229 } else {
230- // TextTemplate was null — create a new one
231- result = append (result , bson.E {Key : "TextTemplate" , Value : bson.D {
232- {Key : "$ID" , Value : mpr .IDToBsonBinary (mpr .GenerateID ())},
233- {Key : "$Type" , Value : "Forms$ClientTemplate" },
234- {Key : "Fallback" , Value : bson.D {
235- {Key : "$ID" , Value : mpr .IDToBsonBinary (mpr .GenerateID ())},
236- {Key : "$Type" , Value : "Texts$Text" },
237- {Key : "Items" , Value : bson.A {int32 (3 )}},
238- }},
239- {Key : "Parameters" , Value : bson.A {int32 (2 )}},
240- {Key : "Template" , Value : bson.D {
241- {Key : "$ID" , Value : mpr .IDToBsonBinary (mpr .GenerateID ())},
242- {Key : "$Type" , Value : "Texts$Text" },
243- {Key : "Items" , Value : bson.A {
244- int32 (3 ),
245- bson.D {
246- {Key : "$ID" , Value : mpr .IDToBsonBinary (mpr .GenerateID ())},
247- {Key : "$Type" , Value : "Texts$Translation" },
248- {Key : "LanguageCode" , Value : "en_US" },
249- {Key : "Text" , Value : text },
250- },
251- }},
252- }},
253- }})
230+ // TextTemplate was null in the template — skip.
231+ // Creating a TextTemplate from null triggers CE0463 because Studio Pro
232+ // detects the structural change. The template must be extracted from a
233+ // widget that already has this property configured in Studio Pro.
234+ log .Printf ("warning: opTextTemplate: skipping null TextTemplate (cannot create from scratch without CE0463)" )
235+ result = append (result , elem )
254236 }
255237 } else {
256238 result = append (result , elem )
0 commit comments