Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Implemented PageLayoutType enum lookup "NewsDigest" #1086

Closed
1 task done
DmitriiPavlenko opened this issue Feb 2, 2023 · 2 comments
Closed
1 task done

Not Implemented PageLayoutType enum lookup "NewsDigest" #1086

DmitriiPavlenko opened this issue Feb 2, 2023 · 2 comments
Assignees
Labels
area: pages API 📄 Working with modern pages bug Something isn't working

Comments

@DmitriiPavlenko
Copy link

Category

  • Bug

Describe the bug

Loading pages from site where Page with type "News Digest" is present causing unhandled enum parsing exception in file
https://github.com/pnp/pnpcore/blob/1.8.0/src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs line 983

image

My StackTrace

image

Steps to reproduce

  1. Create page on your Sharepoint site with "News Digest" type https://support.microsoft.com/en-us/office/create-and-send-a-news-digest-42efc3c6-605f-4a9a-85d5-1f9ff46019bf.
  2. Init PnP context with Sharepoint site url where you create the page.
  3. Execute PnPContext.Web.GetPagesAsync() method on previously initialised context.

Expected behavior

  • Page has to be loaded alongside with other pages;
  • Pages loading should not be affected by single page loading error;
  • Enum.Parse should be changed to Enum.TryParse with appropriate handling.

Environment details (development & target environment)

  • SDK version: 1.8
  • OS: Linux
  • SDK used in: ASP.Net Web app
  • Framework: NET 6
  • Browser(s): non related
  • Tooling: Visual Studio 2022
@jansenbe jansenbe self-assigned this Feb 2, 2023
@jansenbe jansenbe added the area: pages API 📄 Working with modern pages label Feb 2, 2023
@jansenbe
Copy link
Contributor

jansenbe commented Feb 2, 2023

Thanks for raising this issue @DmitriiPavlenko , I'll have a look.

@jansenbe jansenbe added the bug Something isn't working label Feb 2, 2023
@jansenbe
Copy link
Contributor

@DmitriiPavlenko : I've implemented support for this, you can now read news digest pages and if needed clone them. There's no support for creating those using the API, does not feel like an API scenario. The updates will be included in the next nightly build (version 1.8.97 or higher), will close the issue now but feel free to re-open or create a new one if the implemented fix is not working for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: pages API 📄 Working with modern pages bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants