Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Cannot get the Page content of the homepage file. C# #1791

Closed
jbranders opened this issue Jun 5, 2018 · 1 comment
Closed

Cannot get the Page content of the homepage file. C# #1791

jbranders opened this issue Jun 5, 2018 · 1 comment

Comments

@jbranders
Copy link

Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you. If you have a actual question, we would ask you to use SharePoint Developer Group at Microsoft Tech Community. Thanks!

####Which PnP repository should you use to report the issue?####
Please navigate to the appropriate repository by clicking on the link below and create your issue there. You can delete this section after you have navigated to the correct repository.

Category

[x] Bug
[ ] Enhancement

Environment

[ ] Office 365 / SharePoint Online
[x] SharePoint 2016
[x] SharePoint 2013

If SharePoint on-premises, what's exact CU version: 16.0.4639.1002

Expected or Desired Behavior

I'm trying to create a site provisioning engine that generate a template on the fly. One of the tasks is to get the web parts on the homepage of the template site, extract them and add it to the template file. But the code failed on extracting the webparts. It' say:

Observed Behavior

What i expected is that the template file contains the part of the pnp:Page and have the web parts included in the template so if we apply it the homepage is the same as these from the template file.

Steps to Reproduce

  • Install CSOM packaged from nuget
  • Extract the template from one site in C#
  • Make sure that you have the following code into your solution.
    ptci.HandlersToProcess = Handlers.Fields | Handlers.ContentTypes | Handlers.Lists | Handlers.Navigation | Handlers.PageContents | Handlers.ComposedLook;

Run the code and you will see that the Pagecontents is not executed or thrown an execption.

Exception:

Specified argument was out of the range of valid values.
Parameter name: controlId

Sometimes we get also this error message:

Field or property "ListId" does not exist.

Could you give some advice to have a workaround?
Thanks in advance.

@jbranders
Copy link
Author

After an update to later release this seems to work again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant