Skip to content

CE0463 on a pluggable widget whose object-list property declares its sub-properties without a <propertyGroup> (Marketplace Calendar toolbarItems) #1632

Open

Description

@stagknee

Repro (v0.27.0 and current main 29dceb2; Mendix 11.12.5; Calendar 2.6.1)

The bug-test for #1578, unchanged: mdl-examples/bug-tests/1578-calendar-expression-properties.mdl.

mxcli widget init -p app.mpr
mxcli exec mdl-examples/bug-tests/1578-calendar-expression-properties.mdl -p app.mpr
mx check app.mpr

exec reports Created page for both pages, and the editable/showEventDate values are stored correctly (#1578 works). But a plain mx check on the saved project fails:

[error] [CE0463] "The definition of this widget has changed. ..." at Calendar 'calDefaults'
[error] [CE0463] "The definition of this widget has changed. ..." at Calendar 'calReadOnly'

The same happens for any Calendar written by mxcli, on v0.27.0 too.

mxcli docker check reports it clean, because it runs update-widgets on a temporary copy first. Only mx check on the stored project shows it. Studio Pro shows it too, until "Update all widgets".

What differs

I compared the page with a copy that mx update-widgets had repaired (ids stripped). There is exactly one difference per widget. In the widget's Type, the toolbarItems property (type="object" isList="true") has ValueType.ObjectType: null, where mxbuild writes a CustomWidgets$WidgetObjectType with the 14 sub-property types (itemType, position, caption, …). The widget's Object values are identical.

Cause

The Calendar has no embedded template, so its Type comes from GenerateFromMPK, which builds an object property's ObjectType from PropertyDef.Children. The .mpk parser fills Children only from <propertyGroup> elements inside the property's <properties>:

NestedProps []xmlPropGroup `xml:"properties>propertyGroup"`   // modelsdk/widgets/mpk/mpk.go

Calendar.xml lists the sub-properties directly, with each one's category as a <category> element:

<property key="toolbarItems" type="object" isList="true" required="false">
    <properties>
        <property key="itemType" type="enumeration" defaultValue="month">
            <caption>Item</caption>
            <category>Appearance</category>
            ...

So Children is empty and ObjectType stays nil.

Control: the Line chart (Charts package, also no embedded template) wraps the sub-properties of its lines object list in <propertyGroup caption="General">. Its ObjectType is written, and it shows no CE0463.

Expected

Sub-properties declared directly under an object property's <properties> are read like those inside a <propertyGroup>. Their category is taken from the <category> element: mxbuild writes Category: "Appearance" for itemType. A Calendar written by mxcli then passes a plain mx check without fix widgets.

Workaround

Run mxcli fix widgets -p app.mpr after exec. It keeps the stored editable/showEventDate values, and mx check reports 0 errors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions