Skip to content

A quoted Editable: '<expression>' on an input widget is silently dropped: the field stays editable #1567

Open

Description

@stagknee

Repro (v0.26.0, current main, and #1564; headerless and with mdl 1;; Mendix 11.12.5)

create persistent entity Shop.Item (Flag: Boolean, Locked: Boolean, Code: String(50));

create or modify page Shop.PRB_Editable
( Title: 'Probe', Layout: Atlas_Core.PopupLayout, Params: { $Item: Shop.Item } )
{
  dataview dvP (DataSource: $Item) {
    layoutgrid lgP { row rowP { column colP (DesktopWidth: AutoFill) {
      checkbox cbQuotedEditable   (Label: 'A', Attribute: Flag, Editable: '$currentObject/Locked = false')
      checkbox cbQuotedVisible    (Label: 'B', Attribute: Flag, Visible:  '$currentObject/Locked = false')
      textbox  tbQuotedEditable   (Label: 'C', Attribute: Code, Editable: '$currentObject/Locked = false')
      checkbox cbUnquotedEditable (Label: 'D', Attribute: Flag, Editable: $currentObject/Locked = false)
    } } }
  }
};

check passes, exec reports Created page, and mx check reports 0 errors. What gets stored:

Widget Editable ConditionalEditabilitySettings ConditionalVisibilitySettings
cbQuotedEditable Always null null
cbQuotedVisible Always null set
tbQuotedEditable Always null null
cbUnquotedEditable Conditional set null

The quoted Visible: is kept, but the quoted Editable: disappears with no diagnostic. A field meant to be locked becomes editable for everyone, and describe simply omits the property.

Cause

Both keys parse a string literal into the plain property, and the difference is in how each value is consumed:

  • Visible goes through pages.StaticVisibleExpression (sdk/pages/pages_widgets.go). Its default branch takes any other non-empty string as the condition.
  • Editable (cmd_pages_builder_v3.go, around line 599) only consults pages.CanonicalEditability, which accepts exactly Always, Never or Conditional. Anything else is skipped without a word.
  • The check rule MDL-WIDGET19 lets any string through for both keys.

alter page … set (Editable: '…') already refuses the same value, so only the create, replace and insert paths lose it.

Fix

Give Editable the same rule as Visible. A quoted string that is not Always, Never or Conditional is stored as the conditional editability expression, exactly like the unquoted form, and check validates it the same way. I have a PR ready and will link it.

Workaround: write it unquoted: Editable: $currentObject/Locked = false.

Activity

  1. github-actions commented on Oct 17, 2026

    @github-actions

    Issue Triage

    Summary:
    A quoted Editable: '<expression>' on an input widget is silently ignored, causing the widget to remain always editable instead of applying the intended conditional editability.

    Checklist for bug report completeness

    Required info Present? Details
    mxcli version ✅ v0.26.0 (also mentions current main and PR #1564)
    Mendix version ✅ 11.12.5
    Scenario (what was tried) ✅ MDL script that creates a page with quoted Editable: and Visible: attributes
    Expected output ✅ Quoted Editable: should be stored as a conditional editability expression (like Visible:)
    Experienced output ✅ Quoted Editable: is dropped, widget defaults to Always; no error or warning is emitted
    AI bug report (mxcli diag --bundle or session log) ❌ Not provided

    Missing information
    Could you please run mxcli diag --bundle (or at least share the relevant session log) and attach the output? This will help us reproduce the issue and verify the fix. Thank you!


    Automated triage via OpenRouter — workflow source

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