Skip to content

ALTER PAGE cannot add a tab page to an existing tab container — INSERT AFTER <tabpage> and INSERT INTO <tabcontainer> both fail "tabpage must be a direct child of tabcontainer" #1215

Description

@MohamedElNady

Environment

  • mxcli: v0.24.0 (2026-09-24T05:44:35Z), Windows (Git Bash)
  • Mendix: 11.14.0, blank project from mx create-project (MPR v2)
  • Studio Pro: closed

Summary

Adding a tab to a page that already has a tab container is a common incremental change. Neither ALTER PAGE insert form accepts a tabpage, although the new tab page would be a direct child of the tab container in both cases. The only MDL route left is rewriting the whole page with CREATE OR MODIFY PAGE.

Reproduction

create module "ModT";
create page "ModT"."TabsPage" (Title: 'Tabs', Layout: Atlas_Core.Atlas_Default) {
  tabcontainer tabsMain {
    tabpage tpOne (Caption: 'One') {
      dynamictext txtOne (Content: 'one')
    }
  }
};

Then, separately:

alter page "ModT"."TabsPage" { insert after tpOne { tabpage tpTwo (Caption: 'Two') { dynamictext txtTwo (Content: 'two') } } };
-- Error: failed to insert: failed to build widgets: failed to build widget tpTwo: tabpage must be a direct child of tabcontainer

alter page "ModT"."TabsPage" { insert into tabsMain { tabpage tpTwo (Caption: 'Two') { dynamictext txtTwo (Content: 'two') } } };
-- Error: failed to insert: failed to build widgets: failed to build widget tpTwo: tabpage must be a direct child of tabcontainer

Expected

  • INSERT INTO <tabcontainer> appends a tab page.
  • INSERT AFTER/BEFORE <tabpage> places it next to the named sibling.

Actual

Both are refused. The insert seems to build the new widgets without their parent context, so the "direct child" validation fails even though the target is the tab container.

mxcli diag --bundle is available on request.

Activity

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