Forum Discussion

4lexius4 world's avatar
4lexius4 world
Brass Contributor
Mar 02, 2020

PnP Page Provisioning Images are not imported in the new provisioned site.

Hi there,

I'm trying to provision a custom page from one site to another using: 

Apply-PnPProvisioningTemplate -Path c:\temp\myPage.pnp

all custom webpart are correctly added but the images (like Image webpart see screen-shot) are blank and no path under site asset is created.

Test done in both modern site (Communication and Team site), same problem.

I also updated PnP PS with latest version but the problem is still there.

 

Could you please help?

 

Thanks in advance.

Alessio

 

p.s. to export the pnp page I used : Export-PnPClientSidePage

 

  • Carlos_Marins 

    Problem solved! thanks to the great Paolo Pialorsi , who provided us with the solution.
    Sharing below the solution in case it can be useful in similar cases:

     

    1) First Export the client side page using the -PersistBrandingFiles attribute.

    Export-PnPClientSidePage -Identity "TestPage.aspx" -Out .\single-page.xml -PersistBrandingFiles

     

    2) Convert the xml and related content in an unique file pnp.
    Convert-PnPFolderToProvisioningTemplate -Folder .\ -Out c:\temp\single-page.pnp

    3) Then connect to target site and apply the page provisioning.

     

    Thanks Carlos for your time, and thank Paolo for the solution!

     

    Cheers,

    Alessio

     

  • No news/reply so far. Could someone help in case to suggest the appropriate place to submit case like that? GitHub?
  • Hey 4lexius4 world ,

     

    When you generate a site template using PnP, usually the files do not come with it. Probably the Image webpart has kept the reference to the image(its URL), but the image itself isn't there. Can you generate a .xml template instead of a .pnp? This way we can see the properties of the Image webpart. Just change the .pnp in the Out parameter to .xml.

    • 4lexius4 world's avatar
      4lexius4 world
      Brass Contributor

      Hi Carlos_Marins , thanks for your answer.

      FYI when I provision a Site collection using a generated Site Template (.pnp) the images are correctly replaced, the issue I'm facing is only in the PnP Page Provisioning.

       

       

       

      • Carlos_Marins's avatar
        Carlos_Marins
        Iron Contributor

        Hey 4lexius4 world , no problem.

         

        So you're saying the images are being uploaded to the new site you provisioned, but it doesn't show in the page?

        Did you generate the XML template?

         

Share

Resources