Apply-PnPProvisioningTemplate : Value cannot be null. Parameter name: stream #1010

Closed
tom-daly opened this Issue Jan 27, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@tom-daly

Category

[X ] Bug
[ ] Enhancement

Environment

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

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

Expected or Desired Behavior

export a publishing site and apply it to another publishing site

Observed Behavior & STEPS

  1. created a standard publishing site (CMSPUBLISHING#0) with 2 additional lists "Events" & "Announcements"
  2. created a blank web part page in the publishing pages folder and add those webparts to the page.
  3. Get-PnPProvisioningTemplate and save to template.xml
  4. try to apply that to another blank publishing site and get the error.

Apply-PnPProvisioningTemplate : Value cannot be null.
Parameter name: stream
At line:1 char:1

  • Apply-PnPProvisioningTemplate -Path template1.xml
  •   + CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], ArgumentNullException
      + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate
    
    

I'm logging as some articles suggested and I see the issue is with the new default.aspx page I made in the Pages folder.

PowerShell.exe Information: 0 : 2017-01-27 17:14:52.9423 [Files] [10] [Debug] Uploading and overwriting existing file Pages\default.aspx 330ms 42068b57-c990-4b68-9022-f57aa31f9edb
PowerShell.exe Error: 0 : 2017-01-27 17:14:53.1300 [OfficeDevPnP.Core] [0] [Error] File default.aspx not found in directory Pages. Exception = Could not find a part of the path 'C:\365\Pages\default.aspx'. 0ms
PowerShell.exe Error: 0 : 2017-01-27 17:14:53.1300 [OfficeDevPnP.Core] [0] [Error] File default.aspx not found in directory Pages. Exception = Could not find a part of the path 'C:\365\Pages\default.aspx'.

Questions)

  1. Is this supposed to error?
  2. Is there a flag to export the Pages/default.aspx when getting the template
  3. I want this file and the arranged webparts > what alternatives would be to this

If i remove that section from the .xml everything is fine. If I import and use " Apply-PnPProvisioningTemplate -Path template2.xml -ExcludeHandlers Files" then it works as well.

Thanks in advance!

@PaoloPia

This comment has been minimized.

Show comment
Hide comment
@PaoloPia

PaoloPia Jan 28, 2017

Collaborator

Hi Thomas,
Thanks for your feedback. It is a known bug that we're already working on. Stay tuned ...

Collaborator

PaoloPia commented Jan 28, 2017

Hi Thomas,
Thanks for your feedback. It is a known bug that we're already working on. Stay tuned ...

@wukimus

This comment has been minimized.

Show comment
Hide comment
@wukimus

wukimus Feb 3, 2017

I get this error as well but it is with a branding file i have called index.html

wukimus commented Feb 3, 2017

I get this error as well but it is with a branding file i have called index.html

@jansenbe

This comment has been minimized.

Show comment
Hide comment
@jansenbe

jansenbe Mar 10, 2017

Contributor

This should work, don't forget to set the PersistBrandingFiles option when you extract the template. Closing the issue now, but feel free to re-open if you can still reproduce this using the latest version (March)

Contributor

jansenbe commented Mar 10, 2017

This should work, don't forget to set the PersistBrandingFiles option when you extract the template. Closing the issue now, but feel free to re-open if you can still reproduce this using the latest version (March)

@jansenbe jansenbe closed this Mar 10, 2017

@Mukesh2085

This comment has been minimized.

Show comment
Hide comment
@Mukesh2085

Mukesh2085 Mar 27, 2017

@jansenbe I am facing this issue with PnP remote provisioning schema xml for file upload in SharePoint Online, can you please suggest which files I need to update to latest version? I am using CSOM code to apply template and have updated my NuGet Package to Microsoft.SharePointOnline.CSOM to 16.1.6216.1200 & SharePointPnPCoreOnline to 2.13.1703 and still facing the error.

Mukesh2085 commented Mar 27, 2017

@jansenbe I am facing this issue with PnP remote provisioning schema xml for file upload in SharePoint Online, can you please suggest which files I need to update to latest version? I am using CSOM code to apply template and have updated my NuGet Package to Microsoft.SharePointOnline.CSOM to 16.1.6216.1200 & SharePointPnPCoreOnline to 2.13.1703 and still facing the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment