Skip to content

fix: write valid show-page parameter mappings#338

Open
hjotha wants to merge 1 commit intomendixlabs:mainfrom
hjotha:submit/writer-showpage-parameter-mapping-validity
Open

fix: write valid show-page parameter mappings#338
hjotha wants to merge 1 commit intomendixlabs:mainfrom
hjotha:submit/writer-showpage-parameter-mapping-validity

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 27, 2026

Summary

  • writes Forms$PageParameterMapping.Variable as a valid empty Forms$PageVariable object instead of null
  • uses the Mendix storage-list marker for FormSettings.ParameterMappings rather than the mapping count
  • adds a BSON-level regression test for the serialized show-page parameter mapping shape

Why

Studio Pro rejects PageParameterMapping.Variable = null while loading a project. mxcli exec could succeed, but the resulting MPR was not openable when a show-page action contained page parameter mappings.

Validation

  • make build
  • make lint-go
  • make test

Closes #295.
Related to #332.

Symptom: executing described show-page actions with page parameter mappings could write an MPR that Studio Pro refused to load because the PageParameterMapping.Variable property was null.

Root cause: the writer emitted nil for the Forms$PageParameterMapping Variable field and used the mapping count as the storage-list marker.

Fix: emit the expected empty Forms$PageVariable object and use the standard Mendix storage-list marker for FormSettings parameter mappings.

Tests: add a BSON-level ShowPageAction regression test that asserts the marker and non-null Forms$PageVariable payload, plus the existing show-page roundtrip tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] CREATE SNIPPET with Params + $currentObject page call creates null PageParameterMapping — project fails to open in Studio Pro

2 participants