pnp / pnpcore

The PnP Core SDK is a modern .NET SDK designed to work for Microsoft 365. It provides a unified object model for working with SharePoint Online and Teams which is agnostic to the underlying API's being called
https://aka.ms/pnp/coresdk/docs
MIT License
288 stars 188 forks source link

GetPagesAsync not providing Page.Controls for SitePage library that has more than 5000 items #1427

Closed ahamedfazil closed 3 months ago

ahamedfazil commented 4 months ago

Category

Describe the bug

I am using GetPagesAsync() method to get all the pages from a Site. Once I fetch the pages I loop through each item and get page Controls. When I fetch all items (where SitePages has more than 5k item) I get all the pages but Controls give 0 items.

If I fetch the same site with page name like GetPagesAsync('abc.aspx') then I can see the controls. I noticed this issue only for the site which has more than 5k items

Steps to reproduce

  1. Fetch site pages which has more than 5k pages using GetPagesAsync()
  2. Loop through fetched pages and access page.Controls

Expected behavior

GetPagesAsync method should return page items with page controls even for the SitePages which has more than 5k pages.

Thanks for your contribution! Sharing is caring.

jansenbe commented 4 months ago

@ahamedfazil : I checked the code and don't see an obvious reason to explain what you see. The only reason I can come up with that the SharePoint API call is somehow not including the needed fields in your 5K+ case. To further validate that scenario, can you grab a Fiddler trace of a GetPagesAsync call on a 5K+ pages library and one one a smaller pages library and get them to me (bjansen@microsoft.com).

jansenbe commented 3 months ago

@ahamedfazil : checking if you can provide the debug information? Or is the issue not reproducible?

jansenbe commented 3 months ago

@ahamedfazil : closing this per no response. If this still is relevant then please provide the needed information.