Forum Discussion
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
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.pnp3) Then connect to target site and apply the page provisioning.
Thanks Carlos for your time, and thank Paolo for the solution!
Cheers,
Alessio
- 4lexius4 worldBrass ContributorNo news/reply so far. Could someone help in case to suggest the appropriate place to submit case like that? GitHub?
- Carlos_MarinsIron Contributor
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 worldBrass 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_MarinsIron 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?