Skip to content

Pluggable widgets built from the .mpk lose their <actionVariables>: the action's ValueType is written with an empty ActionVariables list, and mx check reports CE0463 #1200

Description

@MendixMau

Environment: mxcli v0.24.0 (2026-09-24T05:44:35Z). Same result on v0.23.0 (2026-09-21T11:10:32Z) and on a local build of upstream main at 86d395ee. There is no change under modelsdk/widgets/ between v0.24.0 and 86d395ee. Mendix 11.12.2 (mx check and mx update-widgets from mxbuild 11.12.2). Fresh app from mxcli new App --version 11.12.2, macOS. Widgets, both public releases from mendix/web-widgets:

  • Signature 2.1.0: release signature-web-v2.1.0, asset com.mendix.widget.web.Signature.mpk, sha256 0234843584ab25a88f9b70130d7a8c24a8f38d8a04a4a5efba0f5c2c3636488c.
  • Calendar 2.6.0: release calendar-v2.6.0, the inner widgets/Calendar.mpk of the module package, sha256 8b7baa38bc8c2d7de024ebe9de282ca2f174117728599562d1348e273edd704d.

Summary: When a pluggable widget has no embedded template, mxcli builds the widget type from the .mpk XML. The .mpk parser never reads <actionVariables>, so every action property is written with ActionVariables: [2] (empty). If the widget XML declares action variables, mx check reports CE0463 "The definition of this widget has changed". This happens even on a minimal instance where the action is not set. mxcli check and exec report no problem.

It affects every such widget, not one. In the public mendix/web-widgets repo, five widget XMLs declare <actionVariable>: Calendar, Combo box, Data grid 2, Date time picker and Signature. Combo box 2.5.0 is clean today (0 errors on the same app, as a control) only because mxcli ships an embedded template for it that already carries the variables (templates/mendix-11.6/combobox.json:2136). Data grid 2 and Date time picker were not tested. Of the embedded mendix-11.6 templates, only combobox.json contains a WidgetActionVariable. Calendar and Signature have no template, so they hit this path. So does any third-party or company widget that uses action variables.

Steps to reproduce

  1. mxcli new App --version 11.12.2. Copy com.mendix.widget.web.Signature.mpk (2.1.0) and Calendar.mpk (2.6.0) into widgets/, then run mxcli widget init -p App.mpr. Baseline mx check: The app contains: 0 errors.
  2. Domain: module Catalog, entity Item (Name String, IsSigned Boolean), entity Booking (Title String, StartDate DateTime, EndDate DateTime), one module role with full access to both.
  3. Pages. No action is set on either widget:
create page "Catalog"."Item_Sign" (
  Title: 'Sign', Layout: Atlas_Core.Atlas_Default, Params: { $Item: "Catalog"."Item" }
) {
  dataview "dvItem" (DataSource: $Item) {
    signature "sig1" (hasSignatureAttribute: "IsSigned")
  }
}
create page "Catalog"."Booking_Calendar" (
  Title: 'Bookings', Layout: Atlas_Core.Atlas_Default
) {
  calendar "cal1" (
    datasource: database from "Catalog"."Booking",
    titleAttribute: "Title",
    startAttribute: "StartDate",
    endAttribute: "EndDate"
  )
}
  1. mxcli exec the pages, then mx check App.mpr.

The declaration in Signature 2.1.0's XML:

<property key="onSignEndAction" type="action" required="false">
    <caption>On sign end</caption>
    <actionVariables>
        <actionVariable key="signatureImage" caption="Signature Image Uri" type="String" />
    </actionVariables>
</property>

Calendar 2.6.0 declares 3 + 4 + 3 variables, on onCreateEvent, onDragDropResize and onViewRangeChange.

Actual

$ mxcli check pages.mdl -p App.mpr --references
Check passed!
$ mxcli exec pages.mdl -p App.mpr
Created page Catalog.Item_Sign
Created page Catalog.Booking_Calendar
$ mx check App.mpr
[error] [CE0463] "The definition of this widget has changed. Update this widget by right-clicking it and selecting 'Update widget', or select 'Update all widgets' to update all widgets in the app." at Signature 'sig1'
[error] [CE0463] "The definition of this widget has changed. Update this widget by right-clicking it and selecting 'Update widget', or select 'Update all widgets' to update all widgets in the app." at Calendar 'cal1'
The app contains: 2 errors.

This result was the same on v0.23.0 and on a main build at 86d395ee.

To see what CE0463 objects to, run mx update-widgets on a copy of the app and compare the widget type before and after. Every PropertyType field that differs:

Widget Field mxcli writes after mx update-widgets
Signature onSignEndAction.ValueType.ActionVariables [2] [2, {Key: "signatureImage", Type: "String", Caption: "Signature Image Uri"}]
Signature imageSource.ValueType.AllowUpload false true (separate cause, see below)
Calendar onCreateEvent / onDragDropResize / onViewRangeChange .ValueType.ActionVariables [2] 3 / 4 / 3 CustomWidgets$WidgetActionVariable entries
Calendar toolbarItems.ValueType.ObjectType null a populated CustomWidgets$WidgetObjectType holding the item's child properties (separate cause, see below)

No property values differ: 0 of 22 for Signature, 0 of 45 for Calendar. Counting the entries directly shows the same thing:

$ mxcli bson dump -p App.mpr --type page --object Catalog.Item_Sign --format json | grep -c -F 'CustomWidgets$WidgetActionVariable'
0          (after mx update-widgets: 1)
$ mxcli bson dump -p App.mpr --type page --object Catalog.Booking_Calendar --format json | grep -c -F 'CustomWidgets$WidgetActionVariable'
0          (after mx update-widgets: 10)

Expected: each action's ValueType.ActionVariables lists the variables the .mpk declares, in declaration order, as CustomWidgets$WidgetActionVariable {Key, Type, Caption}. That is what Studio Pro writes, and what mx update-widgets restores.

Cause (from reading main at 86d395ee):

  • modelsdk/widgets/mpk/mpk.go:209-228: xmlProperty has no field for <actionVariables>, and PropertyDef (:19-51) has nowhere to carry them. git grep -i actionvariable -- modelsdk/widgets/mpk/ returns nothing.
  • modelsdk/widgets/augment.go:781: createDefaultValueType, called from createPropertyPair (:743), always writes "ActionVariables": []any{float64(2)}.
  • The writer side is already there: modelsdk/gen/customwidgets/types.go:561 (WidgetActionVariable), and ActionVariables is a known field of WidgetValueType.
  • Templates hide the gap: templates/mendix-11.6/combobox.json carries the variables Studio Pro wrote, which is why Combo box, with the same kind of declaration, gives 0 errors.

We checked that this cause is enough on its own to trigger CE0463. We used a local build that only adds action-variable parsing, on a third-party widget whose only such feature is action variables. CE0463 went away, and all that remained were two "Property … is required" errors for properties the minimal instance leaves unset. On the two public widgets above, the same build removes every ActionVariables row from the diff. The one other row per widget stays, because it has a different cause:

  • Signature imageSource.AllowUpload: the .mpk has allowUpload="true" on an image property. mpk.go never reads allowUpload (0 hits), and generate.go:124 / augment.go:487-488 default it to false.
  • Calendar toolbarItems.ObjectType: Calendar puts the object-list's children straight under <properties>, with no <propertyGroup>. NestedProps is read only from xml:"properties>propertyGroup" (mpk.go:227), so the children are dropped and ObjectType is written as null.

These are separate root causes and belong in separate issues. They are listed here so that a fix for action variables is not expected to take either widget to 0 errors on its own.

Suggested fixes, ranked

  1. Parse <actionVariables><actionVariable key type caption/> into PropertyDef, in declaration order. Write them as CustomWidgets$WidgetActionVariable entries in createDefaultValueType. Also apply them in the MPK reconciliation pass (reconcileValueTypesFromMPK), so a template that is older than the installed widget picks up variables added in a newer widget version. Add a unit test that parses a fixture with action variables, plus a golden-BSON check against a Studio Pro-made instance.
  2. Until that lands: when the .mpk declares <actionVariables> and the widget has no template, have check or exec warn that mx check will report CE0463. Today every mxcli gate is green, and the first signal is the build.

Workaround: after exec, run mx update-widgets <absolute path to App.mpr>. It rewrites the widget type and removes the CE0463. Note that on these two widgets it then reports 4 CE0642 "Property '…' is required." errors, for properties the minimal instance left empty (Image value and Aria required on Signature, Editable and Show event date range on Calendar). CE0463 was hiding them.

Retest: steps 1–4 on a fresh app, then the two bson dump | grep -c -F 'CustomWidgets$WidgetActionVariable' commands above. Pass = 1 for Catalog.Item_Sign and 10 for Catalog.Booking_Calendar, and no ActionVariables row in a before/after mx update-widgets type diff. mx check reaching 0 errors on these two widgets also needs the two separate causes above fixed.

Related: #574 (CE0463 from editorConfig.js conditional visibility, closed), #548 (CE0463 on engine-routed pluggable widgets, closed), #1161 (CE0463 from a seeded object-list row, closed), #1198 (CE0463 from hidden TextTemplates in object-list items, open). None of them mentions action variables.

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