You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2019. It is now read-only.
Created a ClientSidePage with ClientSideText control and 2 standard webparts using OfficeDev.Pnp.Core methods.
Update ClientSidePage method.
Actual Result:
I have the scenario like this:
CheckIfPageExists which checks of Page exists, this method works for two times and third time, I am getting: "Object reference not set to an instance of the object" from OfficeDevPnP.Core.Pages.ClientSideText.FromHtml(IElement element)
at OfficeDevPnP.Core.Pages.ClientSidePage.LoadFromHtml(String html)
at OfficeDevPnP.Core.Pages.ClientSidePage.Load(ClientContext cc, String pageName)
My code is like below:
private static bool CheckIfPageExists(string pageFileName, Web web)
{
// this line fails
var clientSidePage = ClientSidePage.Load(web.Context.GetSiteCollectionContext(), pageFileName);
if (clientSidePage != null)
{
return true;
}
return false;
}
We closed this issue as it had not activity within last 180 days. This is a generic process we have decided to perform for issues, which have not been explicitly marked still to be "work in progress" based on tags. We are performing this cleaning to make sure that old issues that have already been solved (but not closed) or are no longer relevant are cleaned out and make the issues more manageable. If this issue still valid, we would ask you to open a new issue and follow the guidance in the issue template related on the recommended location. We do apologize any inconveniences this might cause. Please do remember that issues in the issue lists are also messages for others in the community, so you can also check if you can assist on any of them. “Sharing is caring!”
Repro Steps:
Actual Result:
I have the scenario like this:
CheckIfPageExists which checks of Page exists, this method works for two times and third time, I am getting: "Object reference not set to an instance of the object" from OfficeDevPnP.Core.Pages.ClientSideText.FromHtml(IElement element)
at OfficeDevPnP.Core.Pages.ClientSidePage.LoadFromHtml(String html)
at OfficeDevPnP.Core.Pages.ClientSidePage.Load(ClientContext cc, String pageName)
My code is like below:
my update method is like this:
I call the CheckIfPageExists method from another method, if CheckIfPageExists returns true I will call UpdatePage.
Anyone has the same problem?
The text was updated successfully, but these errors were encountered: