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

Fix #1562 #1563

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Fix #1562 #1563

wants to merge 1 commit into from

Conversation

koskila
Copy link

@koskila koskila commented Oct 26, 2024

Makes sure EnsurePagesLibrary ensures pages library for sites where "Site Pages" is not activated by activating the feature.

This is to address pnp/powershell#3959

@jansenbe
Copy link
Contributor

@koskila : I would not just change the default behavior here as for example automatically enabling a SitePages library on a classic publishing portal is not the right thing to do in my mind. Can you change the PR like this:

  1. Update the name of the private EnsurePagesLibraryAsync method to EnsurePagesLibraryImplementationAsync
  2. Add a new EnsurePagesLibraryAsync method that calls the EnsurePagesLibraryImplementationAsync + adds your enhancement. This method can be made a public one by updating the IPages interface

This way the internal flow is not changed and we don't automatically create a SitePages library from existing code paths, if someone however wants this behavior then can call the public EnsurePagesLibraryAsync method

@jansenbe jansenbe assigned jansenbe and koskila and unassigned jansenbe Nov 18, 2024
@jansenbe jansenbe self-requested a review November 18, 2024 09:13
@jansenbe jansenbe added the area: pages API 📄 Working with modern pages label Nov 18, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants