-
Notifications
You must be signed in to change notification settings - Fork 305
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
MC791596 impact on save page #3096
Comments
Thanks @seblhe that said we were waiting for an official pages API and although we got one it doesn't have all the features it needs to have so we're sadly still waiting. As we outline in our docs the solution we have is reverse engineered from the first party APIs and will break if anything changes on Microsoft's side. As you see that's coming to fruition which is why reverse engineering anything is a bad idea. Sadly, maintaining this code take a lot of work, and the team is very busy currently. I'll discuss it with the team and we'll see if/when we can take a look at this issue. Obviously, we're happy to take PR's from the community. |
HI @seblhe, did you maybe find an workaround for this issue? |
This issue all revolves around first party APIs, specifically the Pages API that currently in PnPjs is a reverse engineered version of those 1st party APIs, for more details see this documentation. At this point since a less robust publicly supported pages API has been GA'd we are in a holding pattern. We could remove our implementation and implement the public one but that will mean removing a lot of the functionality. If someone wants to take a stab at it, PR's are welcome. |
SharePoint Client-side Pages API is being deprecated and no changes will be made to the existing endpoint. Closing this issue to track pages updates to #3137 |
This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked. |
Major Version
4.x
Minor Version Number
1.0
Target environment
All
Additional environment details
I'm using NodeJs (18.20.3) and PnPjs(4.3.0)
Expected or Desired Behavior
With the MC791596 the Title area is not mandatory since july, there is a new webPart Banner with the same wePart Id as Title area.
If I a create a page with the new webPart Banner which is not mandatory and then use PnPJs to save the page,
Observed Behavior
PnPJs add the Title area webpart so I get 2 page headers.
Which is surprising is that we can't get with PnPjs the Title Area webpart added with PnPJs
Steps to Reproduce
import { spfi } from "@pnp/sp";
import { IClientsidePage } from "@pnp/sp/clientside-pages";
const sp = spfi(...);
// our page instance
const page: IClientsidePage = await sp.web.loadClientsidePage("/sites/dev/sitepages/home.aspx");
// get the current value
const value = page.bannerImageUrl;
// set the value
page.bannerImageUrl = "/server/relative/path/to/image.png";
await page.save();
The text was updated successfully, but these errors were encountered: