Skip to content

React-Page-Navigator - List View Threshold Error in Sites with More than 5000 Pages #5442

@heinrich-ulbricht

Description

@heinrich-ulbricht

Disclaimer

Yes

Sample

https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-page-navigator/README.md

Contributor(s)

@jhillier-danesmeadesg @hugoabernier @tmaestrini

What happened?

Page Navigator shows nothing if the Site Pages library has more than 5000 pages in it.

Looking at the Network tab of the browser's Developer Tools shows a 500 Server error when calling:

/_api/sitepages/pages?$select=CanvasContent1&$filter=Url%20eq%20%27SitePages/Table-of-Contents.aspx%27

The server response is:

{
    "error": {
        "code": "-2147024860, Microsoft.SharePoint.SPQueryThrottledException",
        "message": "The attempted operation is prohibited because it exceeds the list view threshold."
    }
}

This doesn't happen in a site with less items. Page Navigator there works and shows headings.

Steps to reproduce

  1. Create more than 5000 pages in the Site Pages library
  2. Create a page and add the Page Navigator web part
  3. Add some headings to the page and save the page

The Page Navigator web part shows nothing.

Expected behavior

I expect the Page Navigator to show headings in sites with more than 5000 pages.

Target SharePoint environment

SharePoint Online

Developer environment

Linux

Browsers

  • Internet Explorer
  • Microsoft Edge
  • Google Chrome
  • FireFox
  • Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

What version of Node.js is currently installed on your workstation?

v18.20.7

What version of Node.js is required by the sample?

v18

Paste the results of SPFx doctor

I don't think this does matter. It's clearly a list view threshold-related issue.

Additional environment details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bug-suspectedSuspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions