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
308 stars 194 forks source link

Querying for pages fails when Site Pages library is missing #1562

Open koskila opened 4 weeks ago

koskila commented 4 weeks ago

Category

Describe the bug

https://github.com/pnp/powershell/issues/3959 is caused when creating a Page with Add-PnpPage but it fails in querying the pages because the site is missing

Steps to reproduce

See this issue for details: https://github.com/pnp/powershell/issues/3959

Expected behavior

If trying to create a Modern page on a site, it's expected "Site Pages" library exists or is created if it's missing.

Other stuff

I'll submit a PR for adjusting, please review.

jansenbe commented 5 days ago

@koskila : I've added comments to the PR you've created, thanks for submitting your proposal. My recommendation is to not change the default behavior of the library but rather offer an alternative new public method for developers to force the creation of the site pages library.