Rules / Error Prevention

Opening page missing or hidden

error OPENING_PAGE_INVALID · built in · report layer · scope: Report

What it checks

A pages.json whose landing page names a page the report does not have, or, when no landing page is set, whose active page names a page the report does not have or a page hidden from readers.

The finding is on the report, as Report, at the line of pages.json that names the page, and its detail says which page and what is wrong with it: active page "Product detail" is hidden from readers, or, for a page that is not there, the name pages.json gives it, as landing page "7c41d9e0a2b35f18c6d4" does not exist or active page "7c41d9e0a2b35f18c6d4" does not exist.

Example

Fires the rule
{
  "definition/pages/pages.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.0.0/schema.json",
    "pageOrder": ["p1", "p2"],
    "activePageName": "p2"
  },
  "definition/pages/p1/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p1",
    "displayName": "Overview",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280
  },
  "definition/pages/p2/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p2",
    "displayName": "Product detail",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280,
    "visibility": "HiddenInViewMode"
  }
}
After the fix
{
  "definition/pages/pages.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.1.0/schema.json",
    "pageOrder": ["p1", "p2"],
    "activePageName": "p2",
    "landingPageName": "p1"
  },
  "definition/pages/p1/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p1",
    "displayName": "Overview",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280
  },
  "definition/pages/p2/page.json": {
    "$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.1.0/schema.json",
    "name": "p2",
    "displayName": "Product detail",
    "displayOption": "FitToPage",
    "height": 720,
    "width": 1280,
    "visibility": "HiddenInViewMode"
  }
}

The report was saved while Product detail, a hidden page, was on screen, so the finding reads active page "Product detail" is hidden from readers. The fix sets Overview as the landing page, so the report opens there whatever page is active when it is next saved.

Why it matters

With no landing page, Power BI opens a report on the page that was active when it was saved or published. When that page is hidden, readers start on it: Microsoft's documentation says a report saved while looking at a hidden page shows that page first. A hidden page is usually a tooltip, a drillthrough target, or a page that a button leads to, built to be reached from somewhere else, and in reading view it is not in the page list, so a reader who leaves it cannot find the way back.

A page name that matches no page usually comes from a hand edit or a merge: a page deleted or renamed in one branch while pages.json in another still names it. Renaming a page's name can break the references to it, as Microsoft's PBIR documentation warns. Power BI Desktop repairs an active page that names nothing when it opens the report, with a warning, but the file stays wrong until someone saves it, and nothing in the file says which page was meant.

How to fix it

In Power BI Desktop, set a visible landing page: right-click the tab of the page readers should start on and select Set as landing page, or, with nothing selected on the page, open the Format pane, expand Page information, and turn on Landing page. The report then opens there whatever page is active when it is saved. Without a landing page, open a visible page before you save, so that page becomes the active one.

In pages.json, point landingPageName or activePageName at the name of a page that exists and is visible, one whose page.json does not set "visibility": "HiddenInViewMode". landingPageName needs the pagesMetadata 1.1.0 schema in $schema, as the fixed example shows.

When to ignore it

When readers are meant to start on a hidden page, make it the landing page: Power BI supports a hidden landing page, and this rule does not report one. Short of that, there is no case for keeping the finding, because a report that opens on a missing page, or on a helper page by accident, starts every reader in the wrong place.

This rule reports on the report itself, so there is no object to annotate. To turn the rule off for a whole project, set "OPENING_PAGE_INVALID": "off" under rules in pbiplint.config.json.

Quirks

Check a report for this Improve this page