Skip to content

DESCRIBE emits unquoted reserved-keyword datagrid column names (e.g. 'column Title'), which fails to re-parse — #619 missed columns #638

@ako

Description

@ako

Summary

#619 added mdlIdent() (double-quotes a name when it collides with a reserved keyword) and applied it to general widget names in DESCRIBE output, but datagrid column names were missed. A column whose name is a reserved word — very common, e.g. Title, Description, Status — is emitted unquoted as column Title (...), which fails to re-parse, breaking the DESCRIBE roundtrip for the page.

Reproduction

A datagrid with a column bound to an attribute named Title describes as:

column Title (Attribute: Title, Caption: 'Title') {
  textfilter titleFilter
}
$ mxcli check dump.mdl
  - line N:17 missing {IDENTIFIER, QUOTED_IDENTIFIER} at 'Title'

(The error set now includes QUOTED_IDENTIFIER thanks to #619 — the parser would accept column "Title" (...), but DESCRIBE emits it unquoted.)

Root cause

mdl/executor/cmd_pages_describe_output.go:

// line 589 — general widgets: quoted correctly (via #619)
header := fmt.Sprintf("%s %s", widgetType, mdlIdent(w.Name))
// line 837 — columns: NOT quoted
header := fmt.Sprintf("column %s", colName)

Fix

Wrap the column name with mdlIdent, mirroring the general widget path:

header := fmt.Sprintf("column %s", mdlIdent(colName))

Real-world trigger

describe module OntologyViewer with all on an app whose grids have Title/Description columns. With #633/#634/#637 fixed, this column-name gap is the last thing keeping describe module … with all from round-tripping.

Environment

mxcli built from current main (includes #619); reproduced via mxcli check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions