SOLVED

Apply-PnPProvisioningTemplate : File not Found

%3CLINGO-SUB%20id%3D%22lingo-sub-236739%22%20slang%3D%22en-US%22%3EApply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236739%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3CBR%20%2F%3EI%20have%20a%20problem%20using%20Apply-PnPProvisioningTemplate%20with%20PowerShell%20on%20a%20SharePoint%20Online%20context.%3CBR%20%2F%3E%3CBR%20%2F%3E%23website%20created%20to%20be%20used%20as%20a%20template%3CBR%20%2F%3EConnect-PnPOnline%20-Url%20%22https%3A%2F%2F%24principalWebSite%2F%22%20%E2%80%93Credentials%20%24adminCredentials%3CBR%20%2F%3ENew-PnPWeb%20-Title%20%22srcTemplate%22%20-Url%20srctemplate%20-Description%20%22srcTemplate%22%26nbsp%3B%20-BreakInheritance%20-InheritNavigation%20-Template%20%22STS%230%22%20-Locale%201036%3CBR%20%2F%3EDisconnect-PnPOnline%3CBR%20%2F%3E%3CBR%20%2F%3E%23website%20exported%20as%20a%20template.pnp%3CBR%20%2F%3EConnect-PnPOnline%20%E2%80%93Url%20%22https%3A%2F%2F%24principalWebSite%2FsrcTemplate%22%20%E2%80%93Credentials%20%24adminCredentials%3CBR%20%2F%3EGet-PnPProvisioningTemplate%20-Out%20%24path%2F%24file.pnp%26nbsp%3B%20-PersistBrandingFiles%20-PersistPublishingFiles%3CBR%20%2F%3EDisconnect-PnPOnline%3CBR%20%2F%3E%3CBR%20%2F%3E%23website%20created%20to%20be%20modified%20by%20the%20template%3CBR%20%2F%3EConnect-PnPOnline%20-Url%20%22https%3A%2F%2F%24principalWebSite%2F%22%20%E2%80%93Credentials%20%24adminCredentials%3CBR%20%2F%3ENew-PnPWeb%20-Title%20%22newWebSite%22%20-Url%20newwebsite%20-Description%20%22newWebSite%22%26nbsp%3B%20-BreakInheritance%20-InheritNavigation%20-Template%20%22STS%230%22%20-Locale%201036%3CBR%20%2F%3EDisconnect-PnPOnline%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%23website%20modified%20by%20the%20template%3CBR%20%2F%3EConnect-PnPOnline%20-Url%20%22https%3A%2F%2F%24principalWebSite%2Fnewwebsite%22%20%E2%80%93Credentials%20%24adminCredentials%3CBR%20%2F%3ESet-PnPTraceLog%20-On%20-LogFile%20%24path%2F%24file.xml%20-Level%20Debug%3CBR%20%2F%3EApply-PnPProvisioningTemplate%20-Path%20%24modelePath%20%23-Handlers%20Pages%20-ExcludeHandlers%20Lists%3CBR%20%2F%3ESet-PnPTraceLog%20-Off%3CBR%20%2F%3EDisconnect-PnPOnline%3CBR%20%2F%3E%3CBR%20%2F%3EError%20Message%20%3A%20File%20not%20found%3CBR%20%2F%3EApply-PnPProvisioningTemplate%20%3A%20Fichier%20introuvable.%3CBR%20%2F%3EAu%20caract%C3%A8re%20Ligne%3A3%20%3A%201%3CBR%20%2F%3E%2B%20Apply-PnPProvisioningTemplate%20-Path%20%24modelePath%20%23-Handlers%20Pages%20-Exc%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20CategoryInfo%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20WriteError%3A%20(%3A)%20%5BApply-PnPProvisioningTemplate%5D%2C%20ServerException%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2B%20FullyQualifiedErrorId%20%3A%20EXCEPTION%2CSharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EsrcTemplate%20File%20is%20founded%20and%20I%20can%20see%20that%20it%20is%20working%20for%20a%20while%20(attachments%2C%20lists%2C%20library%2C%20etc.)%20and%20this%20it%20stop%20with%20this%20error.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EsrcTemplate%20%26amp%3B%20log%20file%20in%20attachment.%3CBR%20%2F%3E%3CBR%20%2F%3EDoes%20anyone%20have%20an%20idea%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-236739%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApply-PnPProvisioningTemplate%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-261593%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-261593%22%20slang%3D%22en-US%22%3E%3CP%3EOkay%20sorry%20my%20mistake%20!%3C%2FP%3E%3CP%3EIts%20finally%20works...%20almost%20haha%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20Home%20page%20with%20new%20experience%20but%20it%20is%20not%20keeped.%20Page%20file%20has%20been%20removed.%20But%20it%20is%20another%20problem.%20I%20gonna%20Google%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot%20everybody%20!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-261558%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-261558%22%20slang%3D%22en-US%22%3EHi%20Jeremy%2C%3CBR%20%2F%3E%3CBR%20%2F%3ETry%20to%20save%20your%20template%20to%20e.g.%20srcTemplate.xml%20and%20edit%20it%20in%20Visual%20Studio%20Code%2C%20or%20any%20other%20editor%20of%20your%20choice.%3CBR%20%2F%3EDon't%20forget%20to%20delete%20the%20lines%20just%20above%2C%20and%20below%20the%20field%20you%20removed%20before.%20Those%20are%20%3CFIELDS%3E%20and%20%3C%2FFIELDS%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20i%20take%20one%20of%20your%20fields%20as%20example%2C%20you%20shoulde%20remove%20the%20following%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CFIELDS%3E%3CBR%20%2F%3E%3CFIELD%20id%3D%22%26quot%3B%7B1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be%7D%26quot%3B%22%20name%3D%22%26quot%3B_DisplayName%26quot%3B%22%20displaceonupgrade%3D%22%26quot%3BTRUE%26quot%3B%22%20sortable%3D%22%26quot%3BFALSE%26quot%3B%22%20filterable%3D%22%26quot%3BFALSE%26quot%3B%22%20hidden%3D%22%26quot%3BFALSE%26quot%3B%22%20readonly%3D%22%26quot%3BTRUE%26quot%3B%22%20showinfiledlg%3D%22%26quot%3BFALSE%26quot%3B%22%20type%3D%22%26quot%3BLookup%26quot%3B%22%20displayname%3D%22%26quot%3B%7Bres%3AField_Niveau_de_confidentialit%C3%A9_DisplayName%7D%26quot%3B%22%20list%3D%22%26quot%3BDocs%26quot%3B%22%20listinternal%3D%22%26quot%3BIpLabelCache%26quot%3B%22%20fieldref%3D%22%26quot%3BLabelId%26quot%3B%22%20showfield%3D%22%26quot%3BDisplayName%26quot%3B%22%20leftlist%3D%22%26quot%3BDocs%26quot%3B%22%20leftcolumnname%3D%22%26quot%3BIpLabelId%26quot%3B%22%20joincolname%3D%22%26quot%3BLabelId%26quot%3B%22%20joinrowordinal%3D%22%26quot%3B0%26quot%3B%22%20jointype%3D%22%26quot%3BLEFT%22%20outer%3D%22%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%3C%2FA%3E%22%20StaticName%3D%22_DisplayName%22%20FromBaseType%3D%22TRUE%22%20%2F%26gt%3B%3CBR%20%2F%3E%3C%2FFIELD%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThen%20save%20your%20xml%20file%20and%20use%20that%20to%20apply%20your%20template%20%3B).%20You%20can%20also%20attach%20your%20xml%20file%20so%20that%20i%20can%20have%20a%20quick%20look%20at%20it%20for%20other%20inconsistencies%3C%2FFIELDS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-261541%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-261541%22%20slang%3D%22en-US%22%3E%3CP%3ESo%20I%20have%20renamed%20srcTemplate.pnp%20to%20srcTemplate.zip%3CBR%20%2F%3EExtracted%20srcTemplate.zip%3CBR%20%2F%3EEdited%20this%20file%20%3A%20%5CFiles%5C%3CGUID%3E.xml%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20deleted%20%3A%3CBR%20%2F%3E%3CFIELD%20id%3D%22%26quot%3B%7B1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be%7D%26quot%3B%22%20name%3D%22%26quot%3B_DisplayName%26quot%3B%22%20displaceonupgrade%3D%22%26quot%3BTRUE%26quot%3B%22%20sortable%3D%22%26quot%3BFALSE%26quot%3B%22%20filterable%3D%22%26quot%3BFALSE%26quot%3B%22%20hidden%3D%22%26quot%3BFALSE%26quot%3B%22%20readonly%3D%22%26quot%3BTRUE%26quot%3B%22%20showinfiledlg%3D%22%26quot%3BFALSE%26quot%3B%22%20type%3D%22%26quot%3BLookup%26quot%3B%22%20displayname%3D%22%26quot%3B%7Bres%3AField_Niveau_de_confidentialit%C3%A9_DisplayName%7D%26quot%3B%22%20list%3D%22%26quot%3BDocs%26quot%3B%22%20listinternal%3D%22%26quot%3BIpLabelCache%26quot%3B%22%20fieldref%3D%22%26quot%3BLabelId%26quot%3B%22%20showfield%3D%22%26quot%3BDisplayName%26quot%3B%22%20leftlist%3D%22%26quot%3BDocs%26quot%3B%22%20leftcolumnname%3D%22%26quot%3BIpLabelId%26quot%3B%22%20joincolname%3D%22%26quot%3BLabelId%26quot%3B%22%20joinrowordinal%3D%22%26quot%3B0%26quot%3B%22%20jointype%3D%22%26quot%3BLEFT%22%20outer%3D%22%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%3C%2FA%3E%22%20StaticName%3D%22_DisplayName%22%20FromBaseType%3D%22TRUE%22%20%2F%26gt%3B%3C%2FFIELD%3E%3C%2FGUID%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3Eand%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFIELD%20id%3D%22%26quot%3B%7B1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be%7D%26quot%3B%22%20name%3D%22%26quot%3B_DisplayName%26quot%3B%22%20displaceonupgrade%3D%22%26quot%3BTRUE%26quot%3B%22%20sortable%3D%22%26quot%3BFALSE%26quot%3B%22%20filterable%3D%22%26quot%3BFALSE%26quot%3B%22%20hidden%3D%22%26quot%3BFALSE%26quot%3B%22%20readonly%3D%22%26quot%3BTRUE%26quot%3B%22%20showinfiledlg%3D%22%26quot%3BFALSE%26quot%3B%22%20type%3D%22%26quot%3BLookup%26quot%3B%22%20displayname%3D%22%26quot%3B%7Bres%3AField_Niveau_de_confidentialit%C3%A9_DisplayName%7D%26quot%3B%22%20list%3D%22%26quot%3BDocs%26quot%3B%22%20listinternal%3D%22%26quot%3BIpLabelCache%26quot%3B%22%20fieldref%3D%22%26quot%3BLabelId%26quot%3B%22%20showfield%3D%22%26quot%3BDisplayName%26quot%3B%22%20leftlist%3D%22%26quot%3BDocs%26quot%3B%22%20leftcolumnname%3D%22%26quot%3BIpLabelId%26quot%3B%22%20joincolname%3D%22%26quot%3BLabelId%26quot%3B%22%20joinrowordinal%3D%22%26quot%3B0%26quot%3B%22%20jointype%3D%22%26quot%3BLEFT%22%20outer%3D%22%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%3C%2FA%3E%22%20StaticName%3D%22_DisplayName%22%20FromBaseType%3D%22TRUE%22%20%2F%26gt%3B%3C%2FFIELD%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3Eand%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFIELD%20id%3D%22%26quot%3B%7B1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be%7D%26quot%3B%22%20name%3D%22%26quot%3B_DisplayName%26quot%3B%22%20displaceonupgrade%3D%22%26quot%3BTRUE%26quot%3B%22%20sortable%3D%22%26quot%3BFALSE%26quot%3B%22%20filterable%3D%22%26quot%3BFALSE%26quot%3B%22%20hidden%3D%22%26quot%3BFALSE%26quot%3B%22%20readonly%3D%22%26quot%3BTRUE%26quot%3B%22%20showinfiledlg%3D%22%26quot%3BFALSE%26quot%3B%22%20type%3D%22%26quot%3BLookup%26quot%3B%22%20displayname%3D%22%26quot%3B%7Bres%3AField_Niveau_de_confidentialit%C3%A9_DisplayName%7D%26quot%3B%22%20list%3D%22%26quot%3BDocs%26quot%3B%22%20listinternal%3D%22%26quot%3BIpLabelCache%26quot%3B%22%20fieldref%3D%22%26quot%3BLabelId%26quot%3B%22%20showfield%3D%22%26quot%3BDisplayName%26quot%3B%22%20leftlist%3D%22%26quot%3BDocs%26quot%3B%22%20leftcolumnname%3D%22%26quot%3BIpLabelId%26quot%3B%22%20joincolname%3D%22%26quot%3BLabelId%26quot%3B%22%20joinrowordinal%3D%22%26quot%3B0%26quot%3B%22%20jointype%3D%22%26quot%3BLEFT%22%20outer%3D%22%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%3C%2FA%3E%22%20StaticName%3D%22_DisplayName%22%20FromBaseType%3D%22TRUE%22%20%2F%26gt%3B%3CBR%20%2F%3E%3CBR%20%2F%3EZipped%20to%20srcTemplate.zip%3CBR%20%2F%3ERenamed%20to%20srcTemplate.pnp%3C%2FFIELD%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApply-PnPProvisioningTemplate%20%3A%20The%20Provisioning%20Template%20URI%20srcTemplate.xml%20is%20not%20valid.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-261533%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-261533%22%20slang%3D%22en-US%22%3EHi%20Jeremy%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThere%20is%20a%20bug%20in%20the%20provisioning%20schema%20causing%20this%20error.%20try%20to%20find%20the%20field%20Name%3D%22_DisplayName%22%20within%20your%20template.xml%20(there%20are%20multiple%20of%20them)%20are%20remove%20those%20fieds%20%3B)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3ECheck%20out%20my%20post%20a%20bit%20up%20in%20the%20thread%20for%20more%20Infos%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-261512%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-261512%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20yes%2C%20it%20is%20the%20same%20%24path%20than%20the%20one%20used%20to%20export%20the%20template%20at%20the%20beginning.%3CBR%20%2F%3EI%20can%20see%20that%20SharePoint%20is%20reading%20and%20uploading%20things%20in%20lists%20but%20at%20one%20moment%2C%20it%20crashes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-261511%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-261511%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3CBR%20%2F%3EI%20have%20already%20deleted%20the%20OneNote%20file%20from%20my%20website%20before%20creating%20the%20template.%20I%20have%20even%20deleted%20the%20file%20from%20the%20site's%20bin.%20And%20the%20link%20in%20the%20navigation%20bar%20has%20been%20deleted%20too.%20This%20is%20not%20my%20problem%20%3A%5C%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-260982%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-260982%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20ran%20into%20this%20issue%20with%20our%20c%23%20provisioning%20system%20today%20as%20well%20and%2C%20as%20mentioned%2C%20solved%20by%20removing%20this%20field%20from%20the%20template%3A%3C%2FP%3E%3CP%3Evar%20pnpTemplate%20%3D%20web.GetProvisioningTemplate(ptci)%3B%3C%2FP%3E%3CP%3Eforeach%20(var%20list%20in%20pnpTemplate.Lists)%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%20list.Fields.RemoveAll(d%20%3D%26gt%3B%20d.SchemaXml.Contains(%22_DisplayName%22))%3B%3CBR%20%2F%3E%7D%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-253286%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253286%22%20slang%3D%22en-US%22%3EI've%20found%20the%20lines%20causing%20the%20Error%3A%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20each%20List%20Instance%2C%20there%20is%20a%20Field%20%22_DisplayName%22%20that%20gets%20updated%3A%20the%20.xml%20looks%20like%20this%3A%3CBR%20%2F%3E%3CFIELDS%3E%3CBR%20%2F%3E%3CFIELD%20id%3D%22%26quot%3B%7B1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be%7D%26quot%3B%22%20name%3D%22%26quot%3B_DisplayName%26quot%3B%22%20displaceonupgrade%3D%22%26quot%3BTRUE%26quot%3B%22%20sortable%3D%22%26quot%3BFALSE%26quot%3B%22%20filterable%3D%22%26quot%3BFALSE%26quot%3B%22%20hidden%3D%22%26quot%3BFALSE%26quot%3B%22%20readonly%3D%22%26quot%3BTRUE%26quot%3B%22%20showinfiledlg%3D%22%26quot%3BFALSE%26quot%3B%22%20type%3D%22%26quot%3BLookup%26quot%3B%22%20displayname%3D%22%26quot%3BSensitivity%26quot%3B%22%20list%3D%22%26quot%3BDocs%26quot%3B%22%20listinternal%3D%22%26quot%3BIpLabelCache%26quot%3B%22%20fieldref%3D%22%26quot%3BLabelId%26quot%3B%22%20showfield%3D%22%26quot%3BDisplayName%26quot%3B%22%20leftlist%3D%22%26quot%3BDocs%26quot%3B%22%20leftcolumnname%3D%22%26quot%3BIpLabelId%26quot%3B%22%20joincolname%3D%22%26quot%3BLabelId%26quot%3B%22%20joinrowordinal%3D%22%26quot%3B0%26quot%3B%22%20jointype%3D%22%26quot%3BLEFT%22%20outer%3D%22%22%3E%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fv3%3C%2FA%3E%22%20StaticName%3D%22_DisplayName%22%20FromBaseType%3D%22TRUE%22%20%2F%26gt%3B%3CBR%20%2F%3E%3C%2FFIELD%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20removed%20this%20Field%20Updates%20and%20was%20able%20to%20apply%20my%20template%20as%20I%20wanted.%20This%20bug%20seems%20to%20have%20been%20reported%20already%20(And%20fixes%20but%20not%20merged%20yet)%3A%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP-Sites-Core%2Fpull%2F1911%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2FPnP-Sites-Core%2Fpull%2F1911%3C%2FA%3E%3C%2FFIELDS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-253277%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253277%22%20slang%3D%22en-US%22%3EI've%20also%20tried%20using%20the%20-ExcludeHandler%20Navigation%20parameter%2C%20I%20get%20the%20same%20error%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-253254%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253254%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F34855%22%20target%3D%22_blank%22%3E%40Jeremy%20GOUPIL%3C%2FA%3E%26nbsp%3B-%20Looking%20at%20your%20Powershell%20code%2C%26nbsp%3Bare%20you%20setting%20a%20value%20for%26nbsp%3Bthe%26nbsp%3B%3CSPAN%3E%24modelePath%20variable%20used%20for%20the%20Apply-PnPProvisioningTemplate%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-253241%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253241%22%20slang%3D%22en-US%22%3EMaybe%20a%20link%20to%20the%20OneNote%20file%20on%20the%20left%20navigation%3F%20I've%20seen%20this%20as%20the%20cause%20of%20the%20problem%20multiple%20times%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-253238%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-253238%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20experiencing%20the%20same%20issue%3A%20tried%20about%20everything%20but%20don't%20know%20why%20I%20always%20get%20this%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPowerShell_ISE.exe%20Information%3A%200%20%3A%202018-09-16%2022%3A45%3A56.6430%20%5BProvisioning%5D%20%5B14%5D%20%5BDebug%5D%20Code%20execution%20scope%20ended%20107192ms%20656c838b-f844-4709-b8fb-2372ae42169f%3CBR%20%2F%3EApply-PnPProvisioningTemplate%20%3A%20File%20Not%20Found.%3CBR%20%2F%3EAt%20line%3A3%20char%3A1%3CBR%20%2F%3E%2B%20Apply-PnPProvisioningTemplate%20-Path%20%22C%3A%5Ctemp%5CPatrimoniumTeamSiteTempl%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20WriteError%3A%20(%3A)%20%5BApply-PnPProvisioningTemplate%5D%2C%20ServerException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20EXCEPTION%2CSharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20think%20I'm%20referencing%20to%20any%20document%20in%20the%20provisioning%20xml.%3C%2FP%3E%3CP%3Exml%26nbsp%3Bfile%20in%20the%20attachments%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-240741%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240741%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F34855%22%20target%3D%22_blank%22%3E%40Jeremy%20GOUPIL%3C%2FA%3E%26nbsp%3Bjust%20checked%20your%20template%20and%20I%20think%20it's%20the%20OneNote%20reference%20on%20navigation.%3C%2FP%3E%3CP%3E%3CNAVIGATIONNODE%20title%3D%22%26quot%3BBloc-notes%26quot%3B%22%20url%3D%22%26quot%3B%7Bsite%7D%2F_layouts%2F15%2FWopiFrame.aspx%3Fsourcedoc%3D%7B137c43e8-57b9-4f2f-a6ba-0d50fa98c1c5%7D%26amp%3Bamp%3Baction%3Deditnew%26quot%3B%22%20isexternal%3D%22%26quot%3Btrue%26quot%3B%22%3E%3C%2FNAVIGATIONNODE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20removing%20this%20line%26nbsp%3Band%20try%20again%20as%20it%20should%20work%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-240472%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-240472%22%20slang%3D%22en-US%22%3EI%20have%20also%20seen%20this%20error%20lately%2C%20and%20it%20doesn't%20seem%20to%20happen%20every%20time.%20All%20of%20the%20files%20in%20the%20%3CFILES%3E%20node%20are%20in%20the%20same%20directory.%20The%20template%20gets%20partially%20applied%20to%20the%20site%20(e.g.%20Lists%2FLibs%20are%20there)%2C%20but%20fails%20with%20File%20Not%20Found%20before%20uploading%20the%20Files.%20Sometimes%20if%20I%20immediately%20re-run%20the%20Apply-PnPProvisioningTemplate%20command%20it%20works%20without%20error.%20Bizarre.%3C%2FFILES%3E%3CLINGO-SUB%20id%3D%22lingo-sub-237017%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-237017%22%20slang%3D%22en-US%22%3EAnd%20forgot%20about%20theme%20files%20as%20well.%3CBR%20%2F%3EAnd%20also%2C%20very%20likely%2C%20the%20link%20to%20the%20OneNote%20file%20on%20the%20navigation%20element.%20Quite%20sure%20this%20is%20a%20common%20issue%20as%20well.%20There%20is%20a%20way%20to%20generate%20that%20link%20dynamically%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-237016%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-237016%22%20slang%3D%22en-US%22%3EThat's%20correct%2C%20you%20can%20extract%20the%20contents%20of%20the%20file%20as%20if%20it%20was%20a%20zip.%3CBR%20%2F%3ECheck%20also%20for%20other%20references%20other%20than%20pnp%3Afile%20elements.%20For%20example%2C%20a%20custom%20site%20icon%20can%20also%20cause%20this%20if%20I'm%20not%20wrong.%3CBR%20%2F%3EIt%20will%20be%20worth%20quickly%20checking%20your%20entire%20template.%3CBR%20%2F%3EAlso%2C%20check%20if%20the%20master%20pages%20are%20not%20referenced%20(generally%20close%20to%20the%20bottom%20of%20the%20template)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236853%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236853%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20Yes%20I%20have%20already%20read%20about%20this.%3CBR%20%2F%3ETo%20be%20sure%20that%20it%20is%20not%20this%20problem%2C%20I%20have%20made%20my%20test%20on%20an%20empty%20website.%3CBR%20%2F%3EHow%20you%20can%20see%2C%20my%20command%20Get-PnPProvisioningTemplate%20-Out%20arrive%20just%20after%20the%20creation%20of%20the%20website.%20I%20haven't%20added%2Fdeleted%2Fchanged%20nothing%20before...%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20read%20that%20it%20was%20possible%20to%20rename%20the%20.pnp%20to%20.zip%2C%20and%20to%20look%20if%20there%20is%20a%20%22pnp%3Afile%22%20in%20the%20%3CGUID%3E.xml%20file%20of%20the%20folder%20named%20%22Files%22.%3CBR%20%2F%3EBut%20there%20is%20nothing....%3C%2FGUID%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-236794%22%20slang%3D%22en-US%22%3ERe%3A%20Apply-PnPProvisioningTemplate%20%3A%20File%20not%20Found%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-236794%22%20slang%3D%22en-US%22%3E%3CP%3EA%20common%20solution%20to%20that%20error%20is%20to%20open%20the%20template%20file%20look%20for%20the%20File%20references%20and%20ensure%20that%20all%20those%20files%20are%20available%20on%20the%20relative%20location%20where%20your%20template%20is%20located.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20if%20you%20have%20a%20%3CFILE%3E%20element%20referencing%20a%20file%20on%20%22%2FMyFilesExample%2FMyFile.txt%22%2C%26nbsp%3Bnext%20to%20the%20template%20file%20you%20will%20need%20a%20%22MyFilesExample%22%20folder%20and%20inside%20that%20folder%20a%20%22MyFile.txt%22.%3C%2FFILE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20happens%20in%20some%20scenarios%2C%20but%20it's%20generally%20easy%20to%20fix%20as%20you%20can%20just%26nbsp%3Bcreate%20the%20required%20folders%20and%20download%20the%20required%20files%20from%20the%20original%20site%20that%20was%20used%20as%20a%20template.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%3A%20I%20have%20assumed%20that%20you%20are%20doing%20this%20in%202%20steps%3C%2FP%3E%3CP%3E-%20create%20site%20and%20save%20template%3C%2FP%3E%3CP%3E(%22fix%22%20template)%3C%2FP%3E%3CP%3E-%20create%20site%20and%20apply%20template%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello,
I have a problem using Apply-PnPProvisioningTemplate with PowerShell on a SharePoint Online context.

#website created to be used as a template
Connect-PnPOnline -Url "https://$principalWebSite/" –Credentials $adminCredentials
New-PnPWeb -Title "srcTemplate" -Url srctemplate -Description "srcTemplate"  -BreakInheritance -InheritNavigation -Template "STS#0" -Locale 1036
Disconnect-PnPOnline

#website exported as a template.pnp
Connect-PnPOnline –Url "https://$principalWebSite/srcTemplate" –Credentials $adminCredentials
Get-PnPProvisioningTemplate -Out $path/$file.pnp  -PersistBrandingFiles -PersistPublishingFiles
Disconnect-PnPOnline

#website created to be modified by the template
Connect-PnPOnline -Url "https://$principalWebSite/" –Credentials $adminCredentials
New-PnPWeb -Title "newWebSite" -Url newwebsite -Description "newWebSite"  -BreakInheritance -InheritNavigation -Template "STS#0" -Locale 1036
Disconnect-PnPOnline


#website modified by the template
Connect-PnPOnline -Url "https://$principalWebSite/newwebsite" –Credentials $adminCredentials
Set-PnPTraceLog -On -LogFile $path/$file.xml -Level Debug
Apply-PnPProvisioningTemplate -Path $modelePath #-Handlers Pages -ExcludeHandlers Lists
Set-PnPTraceLog -Off
Disconnect-PnPOnline

Error Message : File not found
Apply-PnPProvisioningTemplate : Fichier introuvable.
Au caractère Ligne:3 : 1
+ Apply-PnPProvisioningTemplate -Path $modelePath #-Handlers Pages -Exc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate

srcTemplate File is founded and I can see that it is working for a while (attachments, lists, library, etc.) and this it stop with this error.

 

srcTemplate & log file in attachment.

Does anyone have an idea ?

18 Replies
Highlighted

A common solution to that error is to open the template file look for the File references and ensure that all those files are available on the relative location where your template is located.

 

For example, if you have a <pnp:File> element referencing a file on "/MyFilesExample/MyFile.txt", next to the template file you will need a "MyFilesExample" folder and inside that folder a "MyFile.txt".

 

This happens in some scenarios, but it's generally easy to fix as you can just create the required folders and download the required files from the original site that was used as a template.

 

Note: I have assumed that you are doing this in 2 steps

- create site and save template

("fix" template)

- create site and apply template

 

Hope this helps

 

 

Highlighted

Hi, Yes I have already read about this.
To be sure that it is not this problem, I have made my test on an empty website.
How you can see, my command Get-PnPProvisioningTemplate -Out arrive just after the creation of the website. I haven't added/deleted/changed nothing before...

I have read that it was possible to rename the .pnp to .zip, and to look if there is a "pnp:file" in the <guid>.xml file of the folder named "Files".
But there is nothing....

Highlighted
That's correct, you can extract the contents of the file as if it was a zip.
Check also for other references other than pnp:file elements. For example, a custom site icon can also cause this if I'm not wrong.
It will be worth quickly checking your entire template.
Also, check if the master pages are not referenced (generally close to the bottom of the template)
Highlighted
And forgot about theme files as well.
And also, very likely, the link to the OneNote file on the navigation element. Quite sure this is a common issue as well. There is a way to generate that link dynamically
Highlighted
I have also seen this error lately, and it doesn't seem to happen every time. All of the files in the <pnp:Files> node are in the same directory. The template gets partially applied to the site (e.g. Lists/Libs are there), but fails with File Not Found before uploading the Files. Sometimes if I immediately re-run the Apply-PnPProvisioningTemplate command it works without error. Bizarre.
Highlighted

@Jeremy GOUPIL just checked your template and I think it's the OneNote reference on navigation.

<pnp:NavigationNode Title="Bloc-notes" Url="{site}/_layouts/15/WopiFrame.aspx?sourcedoc={137c43e8-57b9-4f2f-a6ba-0d50fa98c1c5}&amp;action=editnew" IsExternal="true" />

 

Try removing this line and try again as it should work

Highlighted

I'm experiencing the same issue: tried about everything but don't know why I always get this error:

 

PowerShell_ISE.exe Information: 0 : 2018-09-16 22:45:56.6430 [Provisioning] [14] [Debug] Code execution scope ended 107192ms 656c838b-f844-4709-b8fb-2372ae42169f
Apply-PnPProvisioningTemplate : File Not Found.
At line:3 char:1
+ Apply-PnPProvisioningTemplate -Path "C:\temp\PatrimoniumTeamSiteTempl ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Apply-PnPProvisioningTemplate], ServerException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.ApplyProvisioningTemplate

 

I don't think I'm referencing to any document in the provisioning xml.

xml file in the attachments

Highlighted
Maybe a link to the OneNote file on the left navigation? I've seen this as the cause of the problem multiple times
Highlighted

Hello @Jeremy GOUPIL - Looking at your Powershell code, are you setting a value for the $modelePath variable used for the Apply-PnPProvisioningTemplate?

Highlighted
I've also tried using the -ExcludeHandler Navigation parameter, I get the same error
Highlighted
Solution
I've found the lines causing the Error:

After each List Instance, there is a Field "_DisplayName" that gets updated: the .xml looks like this:
<pnp:Fields>
<Field ID="{1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be}" Name="_DisplayName" DisplaceOnUpgrade="TRUE" Sortable="FALSE" Filterable="FALSE" Hidden="FALSE" ReadOnly="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="Sensitivity" List="Docs" ListInternal="IpLabelCache" FieldRef="LabelId" ShowField="DisplayName" LeftList="Docs" LeftColumnName="IpLabelId" JoinColName="LabelId" JoinRowOrdinal="0" JoinType="LEFT OUTER" SchemaVersion="16.0.162.0" RecreateIfMissing="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_DisplayName" FromBaseType="TRUE" />
</pnp:Fields>

I removed this Field Updates and was able to apply my template as I wanted. This bug seems to have been reported already (And fixes but not merged yet): https://github.com/SharePoint/PnP-Sites-Core/pull/1911
Highlighted

We ran into this issue with our c# provisioning system today as well and, as mentioned, solved by removing this field from the template:

var pnpTemplate = web.GetProvisioningTemplate(ptci);

foreach (var list in pnpTemplate.Lists)
{
    list.Fields.RemoveAll(d => d.SchemaXml.Contains("_DisplayName"));
};

 

Highlighted

Hello,
I have already deleted the OneNote file from my website before creating the template. I have even deleted the file from the site's bin. And the link in the navigation bar has been deleted too. This is not my problem :\

Highlighted

Hi, yes, it is the same $path than the one used to export the template at the beginning.
I can see that SharePoint is reading and uploading things in lists but at one moment, it crashes.

Highlighted
Hi Jeremy,

There is a bug in the provisioning schema causing this error. try to find the field Name="_DisplayName" within your template.xml (there are multiple of them) are remove those fieds ;)

Check out my post a bit up in the thread for more Infos
Highlighted

So I have renamed srcTemplate.pnp to srcTemplate.zip
Extracted srcTemplate.zip
Edited this file : \Files\<guid>.xml

I have deleted :
<Field ID="{1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be}" Name="_DisplayName" DisplaceOnUpgrade="TRUE" Sortable="FALSE" Filterable="FALSE" Hidden="FALSE" ReadOnly="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="{res:Field_Niveau_de_confidentialité_DisplayName}" List="Docs" ListInternal="IpLabelCache" FieldRef="LabelId" ShowField="DisplayName" LeftList="Docs" LeftColumnName="IpLabelId" JoinColName="LabelId" JoinRowOrdinal="0" JoinType="LEFT OUTER" SchemaVersion="16.0.162.0" RecreateIfMissing="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_DisplayName" FromBaseType="TRUE" />


and

 

<Field ID="{1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be}" Name="_DisplayName" DisplaceOnUpgrade="TRUE" Sortable="FALSE" Filterable="FALSE" Hidden="FALSE" ReadOnly="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="{res:Field_Niveau_de_confidentialité_DisplayName}" List="Docs" ListInternal="IpLabelCache" FieldRef="LabelId" ShowField="DisplayName" LeftList="Docs" LeftColumnName="IpLabelId" JoinColName="LabelId" JoinRowOrdinal="0" JoinType="LEFT OUTER" SchemaVersion="16.0.162.0" RecreateIfMissing="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_DisplayName" FromBaseType="TRUE" />


and

 

<Field ID="{1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be}" Name="_DisplayName" DisplaceOnUpgrade="TRUE" Sortable="FALSE" Filterable="FALSE" Hidden="FALSE" ReadOnly="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="{res:Field_Niveau_de_confidentialité_DisplayName}" List="Docs" ListInternal="IpLabelCache" FieldRef="LabelId" ShowField="DisplayName" LeftList="Docs" LeftColumnName="IpLabelId" JoinColName="LabelId" JoinRowOrdinal="0" JoinType="LEFT OUTER" SchemaVersion="16.0.162.0" RecreateIfMissing="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_DisplayName" FromBaseType="TRUE" />

Zipped to srcTemplate.zip
Renamed to srcTemplate.pnp

 

Apply-PnPProvisioningTemplate : The Provisioning Template URI srcTemplate.xml is not valid.

Highlighted
Hi Jeremy,

Try to save your template to e.g. srcTemplate.xml and edit it in Visual Studio Code, or any other editor of your choice.
Don't forget to delete the lines just above, and below the field you removed before. Those are <pnp:Fields> and </pnp:Fields>

If i take one of your fields as example, you shoulde remove the following:

<pnp:Fields>
<Field ID="{1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be}" Name="_DisplayName" DisplaceOnUpgrade="TRUE" Sortable="FALSE" Filterable="FALSE" Hidden="FALSE" ReadOnly="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="{res:Field_Niveau_de_confidentialité_DisplayName}" List="Docs" ListInternal="IpLabelCache" FieldRef="LabelId" ShowField="DisplayName" LeftList="Docs" LeftColumnName="IpLabelId" JoinColName="LabelId" JoinRowOrdinal="0" JoinType="LEFT OUTER" SchemaVersion="16.0.162.0" RecreateIfMissing="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_DisplayName" FromBaseType="TRUE" />
</pnp:Fields>

Then save your xml file and use that to apply your template ;). You can also attach your xml file so that i can have a quick look at it for other inconsistencies
Highlighted

Okay sorry my mistake !

Its finally works... almost haha :)

 

I have created Home page with new experience but it is not keeped. Page file has been removed. But it is another problem. I gonna Google it.

 

Thanks a lot everybody !