Forum Discussion

Jess Lassen's avatar
Jess Lassen
Tin Contributor
Oct 29, 2016
Solved

apply pnp template on sub site

Hi, 

I extracted a .pnp template from a sub site (publishing)  and then tried to apply that .pnp template to a newly created sub site (publishing) but I could not do this,

when I try to apply from power shell or C# console application it shows this error

 

I tried by downloading the pnp core source code and found that file stream is missing there, how can I solve this issue? Please help.

 

Here is a screenshot of powershell window

 

 

  • Deleted's avatar
    Deleted
    Oct 31, 2016

    Hi,

     

    it seems the pages are not in the current directory. My pnp:files look like this

    <pnp:File src="SiteAssets\Logo.png" Folder="SiteAssets" Overwrite="true" />

    where src could be C:\temp\sitesassets\logo.png

    so whitout properties

     

    but also do you need to provision the masterpages? If they are already in there why would you like to upload your version?

     

    hope it helps.

15 Replies

    • Jess Lassen's avatar
      Jess Lassen
      Tin Contributor
      Thanks, I'll have a look into the article.
  • Deleted's avatar
    Deleted
    Not applicable

    It is strange. It looks like the path does not exist. Did you check the template with the loaded schema if not working?

    • Jess Lassen's avatar
      Jess Lassen
      Tin Contributor

      Deleted I checked it is loaded when I tried to apply it from debug mode. It applies list instances and when it tries to apply Files (default.aspx) it fails

      • Deleted's avatar
        Deleted
        Not applicable

        Ok that is another question. did you try to rename the default.aspx just to try it and remove the webparts..

         

  • Deleted's avatar
    Deleted
    Not applicable
    It seems your Template is not in the right directory at least it can not find it in the directory you think it is. check the path and check if the template is in this location.
    • Jess Lassen's avatar
      Jess Lassen
      Tin Contributor
      Hi, I double checked and the template is the desired directory. Any help?