Summary
The role-specific home page clause takes a user role, but the documentation says module role and its example passes one. Passing the documented value writes a project mx.exe cannot load.
Part IV Navigation Profiles gives the syntax as [HOME PAGE <Module>.<Page> FOR <Module>.<Role>], and Home Pages and Menus says in prose: "Use HOME PAGE … FOR to direct users to different pages based on their module role", with the example HOME PAGE MyModule.AdminDashboard FOR MyModule.Administrator.
Repro
On a fresh mxcli new … --version 11.13.0 app:
CREATE OR REPLACE NAVIGATION Responsive
HOME PAGE MyFirstModule.Home
HOME PAGE MyFirstModule.AdminHome FOR MyFirstModule.Administrator; -- a MODULE role, as documented
then mx.exe check <app>.mpr.
Actual
Apply reports Navigation profile 'Responsive' updated., exit 0. Then:
ERROR: Mendix.Modeler.Storage.StorageLoadException: One or more invalid values were detected
- Role based home page in has an invalid value '' for property UserRole.
The text 'MyFirstModule.Administrator' is not a valid UserRoleIdentifier.
The module-role qualified name is written into a slot Mendix reads as a UserRoleIdentifier. As with the NOT FOUND PAGE issue, there is no The app contains: N errors. line — the project fails to load.
The working form
A bare user role name:
HOME PAGE MyFirstModule.AdminHome FOR Administrator; -- mx check: 0 errors
Isolated with a control
On a fresh copy at 0 errors, one clause apart:
| step |
result |
| baseline |
0 errors |
same statement without the FOR clause |
0 errors (unchanged) |
+ FOR MyFirstModule.Administrator (module role, as documented) |
project will not load |
FOR Administrator (user role) instead |
0 errors |
Two things here
- The value is not validated. mxcli already performs exactly this check for
ALTER PROJECT SECURITY GUEST ACCESS ON ROLE <r> — it refuses a role name that is not among the project's user roles, and says so clearly. The same validation applied here would turn an unloadable project into a clear error message.
- The documentation points at the wrong kind of role, including in its worked example, so following it is what produces the broken state.
Environment
mxcli 0.19.0 / Mendix 11.13.0. Recovery is headless — re-run the statement with a valid user role, or without the clause.
Summary
The role-specific home page clause takes a user role, but the documentation says module role and its example passes one. Passing the documented value writes a project
mx.execannot load.Part IV Navigation Profiles gives the syntax as
[HOME PAGE <Module>.<Page> FOR <Module>.<Role>], and Home Pages and Menus says in prose: "UseHOME PAGE … FORto direct users to different pages based on their module role", with the exampleHOME PAGE MyModule.AdminDashboard FOR MyModule.Administrator.Repro
On a fresh
mxcli new … --version 11.13.0app:then
mx.exe check <app>.mpr.Actual
Apply reports
Navigation profile 'Responsive' updated., exit 0. Then:The module-role qualified name is written into a slot Mendix reads as a
UserRoleIdentifier. As with theNOT FOUND PAGEissue, there is noThe app contains: N errors.line — the project fails to load.The working form
A bare user role name:
Isolated with a control
On a fresh copy at
0 errors, one clause apart:0 errorsFORclause0 errors(unchanged)FOR MyFirstModule.Administrator(module role, as documented)FOR Administrator(user role) instead0 errorsTwo things here
ALTER PROJECT SECURITY GUEST ACCESS ON ROLE <r>— it refuses a role name that is not among the project's user roles, and says so clearly. The same validation applied here would turn an unloadable project into a clear error message.Environment
mxcli 0.19.0 / Mendix 11.13.0. Recovery is headless — re-run the statement with a valid user role, or without the clause.