pnp / pnpframework

PnP Framework is a .NET library targeting Microsoft 365 containing the PnP Provisioning engine and a ton of other useful extensions
https://pnp.github.io/pnpframework/
MIT License
206 stars 143 forks source link

Pages "extraction" fails, when (modern) Announcements library was created #974

Closed nils-a closed 8 months ago

nils-a commented 8 months ago

I have a site, marked as the "home site" in viva connections. Since that time, the site also contains an "Announcements" library: image

Since the time the Announcements-Library existed, Get-PnPSiteTemplate -out test.xml -Handlers PageContents -IncludeAllClientSidePages creates only empty templates, containing no pages at all.

My first quick finding was that https://github.com/pnp/pnpframework/blob/7c463c88c5dfba208b6d09b553b32f1a90f8051f/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectClientSidePageContents.cs#L67 returns the Announcements library, instead of the Site Pages.

nils-a commented 8 months ago

This problem corresponds perfectly to https://github.com/pnp/pnpcore/commit/0ea1c82c04342754a64881f5c6b01f8ba579efbf