SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-1204096%22%20slang%3D%22en-US%22%3EPnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1204096%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3EI'm%20trying%20to%20provision%20a%20custom%20page%20from%20one%20site%20to%20another%20using%3A%26nbsp%3B%3C%2FP%3E%3CP%3EApply-PnPProvisioningTemplate%20-Path%20c%3A%5Ctemp%5CmyPage.pnp%3C%2FP%3E%3CP%3Eall%20custom%20webpart%20are%20correctly%20added%20but%20the%20images%20(like%20Image%20webpart%20see%20screen-shot)%20are%20blank%20and%20no%20path%20under%20site%20asset%20is%20created.%3C%2FP%3E%3CP%3ETest%20done%20in%20both%20modern%20site%20(Communication%20and%20Team%20site)%2C%20same%20problem.%3C%2FP%3E%3CP%3EI%20also%20updated%20PnP%20PS%20with%20latest%20version%20but%20the%20problem%20is%20still%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20please%20help%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3EAlessio%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ep.s.%20to%20export%20the%20pnp%20page%20I%20used%20%3A%26nbsp%3BExport-PnPClientSidePage%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PictureWebPart.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F174512i25C04C495DBE1943%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22PictureWebPart.JPG%22%20alt%3D%22PictureWebPart.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1213431%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1213431%22%20slang%3D%22en-US%22%3ENo%20news%2Freply%20so%20far.%20Could%20someone%20help%20in%20case%20to%20suggest%20the%20appropriate%20place%20to%20submit%20case%20like%20that%3F%20GitHub%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1213650%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1213650%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F70999%22%20target%3D%22_blank%22%3E%404lexius4%20world%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20you%20generate%20a%20site%20template%20using%20PnP%2C%20usually%20the%20files%20do%20not%20come%20with%20it.%20Probably%20the%20Image%20webpart%20has%20kept%20the%20reference%20to%20the%20image(its%20URL)%2C%20but%20the%20image%20itself%20isn't%20there.%20Can%20you%20generate%20a%20.xml%20template%20instead%20of%20a%20.pnp%3F%20This%20way%20we%20can%20see%20the%20properties%20of%20the%20Image%20webpart.%20Just%20change%20the%20.pnp%20in%20the%20Out%20parameter%20to%20.xml.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1231433%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1231433%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365643%22%20target%3D%22_blank%22%3E%40Carlos_Marins%3C%2FA%3E%26nbsp%3B%2C%20thanks%20for%20your%20answer.%3C%2FP%3E%3CP%3EFYI%20when%20I%20provision%20a%20Site%20collection%20using%20a%20generated%20Site%20Template%20(.pnp)%20the%20images%20are%20correctly%20replaced%2C%20the%20issue%20I'm%20facing%20is%20only%20in%20the%20PnP%20Page%20Provisioning.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1231452%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1231452%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F70999%22%20target%3D%22_blank%22%3E%404lexius4%20world%3C%2FA%3E%26nbsp%3B%2C%20no%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20you're%20saying%20the%20images%20are%20being%20uploaded%20to%20the%20new%20site%20you%20provisioned%2C%20but%20it%20doesn't%20show%20in%20the%20page%3F%3C%2FP%3E%3CP%3EDid%20you%20generate%20the%20XML%20template%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1247271%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1247271%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365643%22%20target%3D%22_blank%22%3E%40Carlos_Marins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20xml%20file%20generated%20(easy%20page%20with%20image)%3A%3C%2FP%3E%3CP%3E%3CPROVISIONING%20pnp%3D%22%26quot%3B%26lt%3BA%22%20href%3D%22http%3A%2F%2Fschemas.dev.office.com%2FPnP%2F2020%2F02%2FProvisioningSchema%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.dev.office.com%2FPnP%2F2020%2F02%2FProvisioningSchema%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.dev.office.com%2FPnP%2F2020%2F02%2FProvisioningSchema%3C%2FA%3E%22%26gt%3B%3CBR%20%2F%3E%3CPREFERENCES%20generator%3D%22%26quot%3BOfficeDevPnP.Core%2C%22%20version%3D%223.18.2002.0%2C%22%20culture%3D%22neutral%2C%22%20publickeytoken%3D%225e633289e95c321a%26quot%3B%22%3E%3C%2FPREFERENCES%3E%3CBR%20%2F%3E%3CTEMPLATES%20id%3D%22%26quot%3BCONTAINER-TEMPLATE-E5234353766A42E1BDA63E0978BB736A%26quot%3B%22%3E%3CBR%20%2F%3E%3CPROVISIONINGTEMPLATE%20id%3D%22%26quot%3BTEMPLATE-E5234353766A42E1BDA63E0978BB736A%26quot%3B%22%20version%3D%22%26quot%3B0%26quot%3B%22%20scope%3D%22%26quot%3BUndefined%26quot%3B%22%3E%3CBR%20%2F%3E%3CCLIENTSIDEPAGES%3E%3CBR%20%2F%3E%3CCLIENTSIDEPAGE%20promoteasnewsarticle%3D%22%26quot%3Bfalse%26quot%3B%22%20promoteastemplate%3D%22%26quot%3Bfalse%26quot%3B%22%20overwrite%3D%22%26quot%3Btrue%26quot%3B%22%20title%3D%22%26quot%3BCoolPage%26quot%3B%22%20thumbnailurl%3D%22%26quot%3B%26quot%3B%22%20pagename%3D%22%26quot%3BCoolPage.aspx%26quot%3B%22%3E%3CBR%20%2F%3E%3CHEADER%20type%3D%22%26quot%3BCustom%26quot%3B%22%20serverrelativeimageurl%3D%22%26quot%3B%7Bsite%7D%2FSiteAssets%2FSitePages%2FCoolPage%2F92504-thumbnailAF.png%26quot%3B%22%20translatex%3D%22%26quot%3B50.1305483028721%26quot%3B%22%20translatey%3D%22%26quot%3B92.1428571428571%26quot%3B%22%20layouttype%3D%22%26quot%3BFullWidthImage%26quot%3B%22%20textalignment%3D%22%26quot%3BCenter%26quot%3B%22%20showtopicheader%3D%22%26quot%3Bfalse%26quot%3B%22%20showpublishdate%3D%22%26quot%3Bfalse%26quot%3B%22%20topicheader%3D%22%26quot%3B%26quot%3B%22%20alternativetext%3D%22%26quot%3B%26quot%3B%22%20authors%3D%22%26quot%3B%5B%26amp%3B%23xD%3B%26amp%3B%23xA%3B%22%3E%3C%2FHEADER%3E%3CBR%20%2F%3E%3CSECTIONS%3E%3CBR%20%2F%3E%3CSECTION%20order%3D%22%26quot%3B1%26quot%3B%22%20type%3D%22%26quot%3BOneColumn%26quot%3B%22%3E%3CBR%20%2F%3E%3CCONTROLS%3E%3CBR%20%2F%3E%3CCANVASCONTROL%20webparttype%3D%22%26quot%3BImage%26quot%3B%22%20jsoncontroldata%3D%22%26quot%3B%7B%26amp%3Bquot%3Bid%26amp%3Bquot%3B%3A%22%3E%3C%2FCANVASCONTROL%3E%3CBR%20%2F%3E%3CCANVASCONTROL%20webparttype%3D%22%26quot%3BList%26quot%3B%22%20jsoncontroldata%3D%22%26quot%3B%7B%26amp%3Bquot%3Bid%26amp%3Bquot%3B%3A%22%3E%3C%2FCANVASCONTROL%3E%3CBR%20%2F%3E%3CCANVASCONTROL%20webparttype%3D%22%26quot%3BNews%26quot%3B%22%20jsoncontroldata%3D%22%26quot%3B%7B%26amp%3Bquot%3Bid%26amp%3Bquot%3B%3A%22%3E%3C%2FCANVASCONTROL%3E%3CBR%20%2F%3E%3CCANVASCONTROL%20webparttype%3D%22%26quot%3BCustom%26quot%3B%22%20jsoncontroldata%3D%22%26quot%3B%7B%26amp%3Bquot%3Bid%26amp%3Bquot%3B%3A%22%3E%3C%2FCANVASCONTROL%3E%3CBR%20%2F%3E%3CCANVASCONTROL%20webparttype%3D%22%26quot%3BCustom%26quot%3B%22%20jsoncontroldata%3D%22%26quot%3B%7B%26amp%3Bquot%3Bid%26amp%3Bquot%3B%3A%22%3E%3C%2FCANVASCONTROL%3E%3CBR%20%2F%3E%3C%2FCONTROLS%3E%3CBR%20%2F%3E%3C%2FSECTION%3E%3CBR%20%2F%3E%3C%2FSECTIONS%3E%3CBR%20%2F%3E%3C%2FCLIENTSIDEPAGE%3E%3CBR%20%2F%3E%3C%2FCLIENTSIDEPAGES%3E%3CBR%20%2F%3E%3C%2FPROVISIONINGTEMPLATE%3E%3CBR%20%2F%3E%3C%2FTEMPLATES%3E%3CBR%20%2F%3E%3C%2FPROVISIONING%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1252103%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1252103%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F70999%22%20target%3D%22_blank%22%3E%404lexius4%20world%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20this%20case%2C%20I%20think%20you%20need%20to%20download%20the%20image%20you're%20using%20as%20a%20Banner%20for%20the%20page%20-%20with%20the%20name%20%2292504-thumbnailAF.png%22%2C%20keep%20it%20in%20the%20same%20directory%20as%20your%20XML%2C%20and%20add%20the%20following%20code%20after%20%22%3CSPAN%3E%3CSPAN%3Epnp%3C%2FSPAN%3E%3CSPAN%3E%3A%3C%2FSPAN%3E%3CSPAN%3EClientSidePages%26gt%3B%3C%2FSPAN%3E%3CSPAN%3E%22%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3E%3CFILES%3E%3CBR%20%2F%3E%3CFILE%20src%3D%22%26quot%3B.%2F92504-thumbnailAF.png%26quot%3B%22%20folder%3D%22%26quot%3BSiteAssets%2FSitePages%2FCoolPage%26quot%3B%22%20overwrite%3D%22%26quot%3Btrue%26quot%3B%22%20level%3D%22%26quot%3BPublished%26quot%3B%22%3E%3C%2FFILE%3E%3CBR%20%2F%3E%3C%2FFILES%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1257068%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1257068%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365643%22%20target%3D%22_blank%22%3E%40Carlos_Marins%3C%2FA%3E%26nbsp%3B%20Dear%20Carlos%20first%20of%20all%20thanks%20a%20lot%20for%20your%20answers%2C%20really%20appreciated.%3C%2FP%3E%3CP%3EUnfortunately%20it%20doesn't%20work%20I'm%20getting%20error%3A%26nbsp%3BApply-PnPProvisioningTemplate%20%3A%20Template%20is%20not%20valid%2C%20when%20I%20add%20the%20pnp%20file%20section%20as%20suggested%20by%20you.%3C%2FP%3E%3CP%3EAdding%20also%20that%20this%20is%20a%20workaround%20with%20a%20manual%20action%2C%20if%20we%20have%20to%20implement%20an%20automatic%20Site%20and%20Page%20provisioning%20for%20n%20sites%2Fpages%20changing%20all%20the%20template%20manually%20doesn't%20make%20any%20sense%2C%20do%20you%20agree%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3EAlessio%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1267467%22%20slang%3D%22en-US%22%3ERe%3A%20PnP%20Page%20Provisioning%20Images%20are%20not%20imported%20in%20the%20new%20provisioned%20site.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1267467%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365643%22%20target%3D%22_blank%22%3E%40Carlos_Marins%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProblem%20solved!%20thanks%20to%20the%20great%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127%22%20target%3D%22_blank%22%3E%40Paolo%20Pialorsi%3C%2FA%3E%20%2C%20who%20provided%20us%20with%20the%20solution.%3CBR%20%2F%3ESharing%20below%20the%20solution%20in%20case%20it%20can%20be%20useful%20in%20similar%20cases%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20First%20Export%20the%20client%20side%20page%20using%20the%20%3CSTRONG%3E-%3CSPAN%3EPersistBrandingFiles%20%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3Eattribute.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CEM%3EExport-PnPClientSidePage%20-Identity%20%22TestPage.aspx%22%20-Out%20.%5Csingle-page.xml%20-PersistBrandingFiles%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2)%20Convert%20the%20xml%20and%20related%20content%20in%20an%20unique%20file%20pnp.%3CBR%20%2F%3E%3CEM%3EConvert-PnPFolderToProvisioningTemplate%20-Folder%20.%5C%20-Out%20c%3A%5Ctemp%5Csingle-page.pnp%3C%2FEM%3E%3C%2FP%3E%3CP%3E3)%20Then%20connect%20to%20target%20site%20and%20apply%20the%20page%20provisioning.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20Carlos%20for%20your%20time%2C%20and%20thank%20Paolo%20for%20the%20solution!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3EAlessio%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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-PnPClientSidePagePictureWebPart.JPG

 

8 Replies
Highlighted
No news/reply so far. Could someone help in case to suggest the appropriate place to submit case like that? GitHub?
Highlighted

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.

Highlighted

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.

 

 

 

Highlighted

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?

 

Highlighted

@Carlos_Marins 

Here is the xml file generated (easy page with image):

<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2020/02/ProvisioningSchema">
<pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.18.2002.0, Culture=neutral, PublicKeyToken=5e633289e95c321a" />
<pnp:Templates ID="CONTAINER-TEMPLATE-E5234353766A42E1BDA63E0978BB736A">
<pnp:ProvisioningTemplate ID="TEMPLATE-E5234353766A42E1BDA63E0978BB736A" Version="0" Scope="Undefined">
<pnp:ClientSidePages>
<pnp:ClientSidePage PromoteAsNewsArticle="false" PromoteAsTemplate="false" Overwrite="true" Title="CoolPage" ThumbnailUrl="" PageName="CoolPage.aspx">
<pnp:Header Type="Custom" ServerRelativeImageUrl="{site}/SiteAssets/SitePages/CoolPage/92504-thumbnailAF.png" TranslateX="50.1305483028721" TranslateY="92.1428571428571" LayoutType="FullWidthImage" TextAlignment="Center" ShowTopicHeader="false" ShowPublishDate="false" TopicHeader="" AlternativeText="" Authors="[&#xD;&#xA; {&#xD;&#xA; &quot;id&quot;: &quot;i:0#.f|membership|alessio@stmdevelop.onmicrosoft.com&quot;,&#xD;&#xA; &quot;upn&quot;: &quot;Alessio@stmdevelop.onmicrosoft.com&quot;,&#xD;&#xA; &quot;name&quot;: &quot;4lexius4 world&quot;,&#xD;&#xA; &quot;role&quot;: &quot;O365 Expert&quot;&#xD;&#xA; }&#xD;&#xA;]" AuthorByLine="[&#xD;&#xA; &quot;i:0#.f|membership|alessio@stmdevelop.onmicrosoft.com&quot;&#xD;&#xA;]" AuthorByLineId="-1" />
<pnp:Sections>
<pnp:Section Order="1" Type="OneColumn">
<pnp:Controls>
<pnp:CanvasControl WebPartType="Image" JsonControlData="{&quot;id&quot;: &quot;d1d91016-032f-456d-98a4-721247c305e8&quot;, &quot;instanceId&quot;: &quot;3ddf86b3-0dcc-46bf-a630-cf7fb0a4211e&quot;, &quot;title&quot;: &quot;Image&quot;, &quot;description&quot;: &quot;Show an image on your page&quot;, &quot;dataVersion&quot;: &quot;1.8&quot;, &quot;properties&quot;: {&quot;imageSourceType&quot;:2,&quot;captionText&quot;:&quot;&quot;,&quot;altText&quot;:&quot;&quot;,&quot;linkUrl&quot;:&quot;&quot;,&quot;overlayText&quot;:&quot;&quot;,&quot;fileName&quot;:&quot;cappello.jpg&quot;,&quot;siteId&quot;:&quot;{sitecollectionid}&quot;,&quot;webId&quot;:&quot;{siteid}&quot;,&quot;listId&quot;:&quot;{listid:Site Assets}&quot;,&quot;uniqueId&quot;:&quot;f30fd372-b76b-4ab4-97d6-c0b02d3c8966&quot;,&quot;imgWidth&quot;:736,&quot;imgHeight&quot;:432,&quot;alignment&quot;:&quot;Center&quot;,&quot;fixAspectRatio&quot;:false}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{&quot;imageSource&quot;:&quot;{site}/SiteAssets/SitePages/CoolPage/69316-cappello.jpg&quot;},&quot;links&quot;:{},&quot;customMetadata&quot;:{&quot;imageSource&quot;:{&quot;siteId&quot;:&quot;{sitecollectionid}&quot;,&quot;webId&quot;:&quot;{siteid}&quot;,&quot;listId&quot;:&quot;{listid:Site Assets}&quot;,&quot;uniqueId&quot;:&quot;f30fd372-b76b-4ab4-97d6-c0b02d3c8966&quot;,&quot;width&quot;:736,&quot;height&quot;:432}}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {}}" ControlId="d1d91016-032f-456d-98a4-721247c305e8" Order="1" Column="1" />
<pnp:CanvasControl WebPartType="List" JsonControlData="{&quot;id&quot;: &quot;f92bf067-bc19-489e-a556-7fe95f508720&quot;, &quot;instanceId&quot;: &quot;68a40094-25b1-421a-98a5-50215c6fd281&quot;, &quot;title&quot;: &quot;Document library&quot;, &quot;description&quot;: &quot;Add a document library&quot;, &quot;dataVersion&quot;: &quot;1.0&quot;, &quot;properties&quot;: {&quot;isDocumentLibrary&quot;:true,&quot;selectedListId&quot;:&quot;{listid:Documents}&quot;,&quot;selectedListUrl&quot;:&quot;{site}/Shared Documents&quot;,&quot;webRelativeListUrl&quot;:&quot;/Shared Documents&quot;,&quot;webpartHeightKey&quot;:4}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{&quot;listTitle&quot;:&quot;Documents&quot;},&quot;imageSources&quot;:{},&quot;links&quot;:{}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {&quot;filterBy&quot;:{}}}" ControlId="f92bf067-bc19-489e-a556-7fe95f508720" Order="2" Column="1" />
<pnp:CanvasControl WebPartType="News" JsonControlData="{&quot;id&quot;: &quot;8c88f208-6c77-4bdb-86a0-0c47b4316588&quot;, &quot;instanceId&quot;: &quot;de6a2463-87f0-47cd-b5e5-1dbefa6d6978&quot;, &quot;title&quot;: &quot;News&quot;, &quot;description&quot;: &quot;Display recent news.&quot;, &quot;dataVersion&quot;: &quot;1.11&quot;, &quot;properties&quot;: {&quot;carouselSettings&quot;:{&quot;autoplay&quot;:false,&quot;autoplaySpeed&quot;:5,&quot;dots&quot;:true,&quot;lazyLoad&quot;:true,&quot;metadata&quot;:true,&quot;swipe&quot;:true,&quot;useStockItems&quot;:false},&quot;showChrome&quot;:true,&quot;showNewsMetadata&quot;:{&quot;showSocialActions&quot;:true,&quot;showAuthor&quot;:true,&quot;showDate&quot;:true},&quot;layoutId&quot;:&quot;GridNews&quot;,&quot;prefetchCount&quot;:4,&quot;filters&quot;:[{&quot;filterType&quot;:1,&quot;value&quot;:&quot;&quot;,&quot;values&quot;:[]}],&quot;newsDataSourceProp&quot;:1,&quot;dataProviderId&quot;:&quot;news&quot;,&quot;newsSiteList&quot;:[],&quot;renderItemsSliderValue&quot;:4,&quot;webId&quot;:&quot;{siteid}&quot;,&quot;siteId&quot;:&quot;{sitecollectionid}&quot;,&quot;pinnedItems&quot;:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],&quot;serializedFilterQuery&quot;:&quot;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=\&quot;FSObjType\&quot; /&gt;&lt;Value Type=\&quot;Integer\&quot;&gt;0&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&quot;}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{},&quot;links&quot;:{&quot;baseUrl&quot;:&quot;{hosturl}{site}&quot;},&quot;componentDependencies&quot;:{&quot;layoutComponentId&quot;:&quot;ef1147f9-e3f4-4844-b4fe-ab7e6c1f3a10&quot;}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {}}" ControlId="8c88f208-6c77-4bdb-86a0-0c47b4316588" Order="3" Column="1" />
<pnp:CanvasControl WebPartType="Custom" JsonControlData="{&quot;id&quot;: &quot;62cac389-787f-495d-beca-e11786162ef4&quot;, &quot;instanceId&quot;: &quot;2afc723f-5ad0-48b1-a431-8442bc5c6403&quot;, &quot;title&quot;: &quot;Countdown Timer&quot;, &quot;description&quot;: &quot;This web part is used to allow a site admin to count down/up to an important event.&quot;, &quot;dataVersion&quot;: &quot;2.1&quot;, &quot;properties&quot;: {&quot;showButton&quot;:false,&quot;countDate&quot;:&quot;Fri Feb 21 2020 17:00:00 GMT+0100 (W. Europe Standard Time)&quot;,&quot;title&quot;:&quot;&quot;,&quot;description&quot;:&quot;&quot;,&quot;countDirection&quot;:&quot;COUNT_DOWN&quot;,&quot;dateDisplay&quot;:&quot;DAY_HOUR_MINUTE_SECOND&quot;,&quot;buttonText&quot;:&quot;&quot;,&quot;buttonURL&quot;:&quot;&quot;}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{},&quot;links&quot;:{}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {}}" ControlId="62cac389-787f-495d-beca-e11786162ef4" Order="4" Column="1" />
<pnp:CanvasControl WebPartType="Custom" JsonControlData="{&quot;id&quot;: &quot;50256fc2-a28f-4544-900e-32724d32bc7f&quot;, &quot;instanceId&quot;: &quot;5a7dc925-9da5-4356-b813-10c8f5d01158&quot;, &quot;title&quot;: &quot;Stock Information&quot;, &quot;description&quot;: &quot;Stock information&quot;, &quot;dataVersion&quot;: &quot;1.0&quot;, &quot;properties&quot;: {&quot;demo&quot;:true,&quot;stockSymbol&quot;:&quot;STM&quot;,&quot;autoRefresh&quot;:true}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{},&quot;links&quot;:{}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {}}" ControlId="50256fc2-a28f-4544-900e-32724d32bc7f" Order="5" Column="1" />
</pnp:Controls>
</pnp:Section>
</pnp:Sections>
</pnp:ClientSidePage>
</pnp:ClientSidePages>
</pnp:ProvisioningTemplate>
</pnp:Templates>
</pnp:Provisioning>

Highlighted

Hey @4lexius4 world ,

 

In this case, I think you need to download the image you're using as a Banner for the page - with the name "92504-thumbnailAF.png", keep it in the same directory as your XML, and add the following code after "</pnp:ClientSidePages>":

      
<pnp:Files>
<pnp:File src="./92504-thumbnailAF.png" Folder="SiteAssets/SitePages/CoolPage" Overwrite="true" Level="Published" />
</pnp:Files>
Highlighted

@Carlos_Marins  Dear Carlos first of all thanks a lot for your answers, really appreciated.

Unfortunately it doesn't work I'm getting error: Apply-PnPProvisioningTemplate : Template is not valid, when I add the pnp file section as suggested by you.

Adding also that this is a workaround with a manual action, if we have to implement an automatic Site and Page provisioning for n sites/pages changing all the template manually doesn't make any sense, do you agree?

 

Thanks!

Alessio

Highlighted
Best Response confirmed by 4lexius4 world (Occasional Contributor)
Solution

@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