Source
Follow-up from ako's review on merged PR #338 (fix: write valid show-page parameter mappings).
Problem
PR #338 fixed `Forms$PageParameterMapping.Variable: nil` because Studio Pro rejected null embedded objects on project load. `Forms$FormSettings.TitleOverride` is written as `nil` in the same block (`sdk/mpr/writer_microflow_actions.go` around line 367). If TitleOverride is an embedded object, it needs the same empty-object treatment as Variable. If it is a string/expression scalar, `nil` is typically accepted.
Issue #295 (the reported bug) only mentioned Variable, so the current code may or may not cause a load failure depending on the Studio Pro version and the action context.
Expected behavior
`TitleOverride` in an authored MPR loads in Studio Pro without an "invalid project" error across all supported Mendix versions.
Proposed fix
- Dump a Studio Pro-generated MPR with a show-page action and inspect the raw BSON for the TitleOverride field. Confirm type (scalar vs embedded object).
- If embedded object: replace `nil` with an empty `Forms$TitleOverride` (or whatever the correct type is) document, mirroring `emptyPageVariable()`.
- If scalar: add a code comment documenting that null is intentional and verified.
- Add a regression test either way.
Related
Source
Follow-up from ako's review on merged PR #338 (fix: write valid show-page parameter mappings).
Problem
PR #338 fixed `Forms$PageParameterMapping.Variable: nil` because Studio Pro rejected null embedded objects on project load. `Forms$FormSettings.TitleOverride` is written as `nil` in the same block (`sdk/mpr/writer_microflow_actions.go` around line 367). If TitleOverride is an embedded object, it needs the same empty-object treatment as Variable. If it is a string/expression scalar, `nil` is typically accepted.
Issue #295 (the reported bug) only mentioned Variable, so the current code may or may not cause a load failure depending on the Studio Pro version and the action context.
Expected behavior
`TitleOverride` in an authored MPR loads in Studio Pro without an "invalid project" error across all supported Mendix versions.
Proposed fix
Related