Skip to content

Pluggable object-list properties (FileUploader allowedFileFormats / customButtons): multi-key entries unparseable, single-key entries pass check+exec then are SILENTLY DROPPED #999

Description

@MohamedGamalEzzatAli

mxcli version: v0.20.0 (release 2026-08-28) · Mendix 11.12.1 bench project, FileUploader .mpk present (widget defs derive fine — scaffolding works)

FileUploader declares repeatable object properties in its widget XML — allowedFileFormats (children: configMode, predefinedType, mimeType, extensions, …) and customButtons (children: buttonCaption, buttonIcon, buttonActionFile, …). MDL has no working surface for them, and the failure mode splits into a parse error and a silent drop:

Repro A — multi-key entry: unparseable

CREATE OR REPLACE PAGE MyModule.UploadPage (Layout: Atlas_Core.Atlas_Default) {
  PLUGGABLEWIDGET 'com.mendix.widget.web.fileuploader.FileUploader' fileUploader1 (maxFileSize: 25, allowedFileFormats: [(configMode: simple, predefinedType: pdfFile)])
};
Syntax errors found:
  - line 2:140 missing ')' at ','
  - line 2:165 extraneous input ')' expecting {',', ']'}

(Adjacent-parens variant [(configMode: simple) (predefinedType: pdfFile)] also fails: mismatched input '(' expecting {',', ']'}.)

Repro B — single-key entry: parses, execs, silently dropped

CREATE OR REPLACE PAGE MyModule.UploadPage (Layout: Atlas_Core.Atlas_Default) {
  PLUGGABLEWIDGET 'com.mendix.widget.web.fileuploader.FileUploader' fileUploader1 (allowedFileFormats: [(configMode: simple)])
};
mxcli check → ✓ Syntax OK (1 statements)
mxcli exec  → Replaced page MyModule.UploadPage

Then:

mxcli describe page MyModule.UploadPage --format mdl  → no allowedFileFormats anywhere
mxcli describe page MyModule.UploadPage --format json | grep -c allowedFileFormats  → 0

The property vanishes without any warning — check-clean, exec-success, zero trace in storage.

(The map-style form allowedFileFormats: ['configMode': 'simple'] also parses; not exec-probed further.)

Control — scalar pluggable props are fine

maxFileSize: 20 at CREATE-level and SET 'maxFileSize' = 25 ON fileUploader1 via ALTER both land and round-trip in describe. The gap is specifically the object-list (repeatable object) property type.

Impact

This is the check/exec-pass-then-discard class (#852's family): a script that lints and applies cleanly leaves the widget missing required configuration with no signal. For FileUploader specifically, allowedFileFormats is how upload restrictions are enforced — a silently-dropped restriction is a correctness and mild security issue for the generated app.

Expected

Either a real grammar + writer for object-list entries (multi-key [(k: v, k: v), (…)] storing Object.Properties[] children), or a hard parse/exec error — anything but silent success.

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