Description
##Describe the bug
Source URL: https://tenant.sharepoint.com/sites/DepartementTemplate
Destination URL: https://tenant.sharepoint.com/sites/DepartementTemplateV2
Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/DepartementTemplate -Interactive
$template = Get-PnPSiteTemplate -OutputInstance -PersistBrandingFiles -IncludeAllClientSidePages -Handlers SiteFooter
Disconnect-PnPOnline
Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/DepartementTemplateV2 -Interactive
Invoke-PnPSiteTemplate -InputInstance $template -ClearNavigation -Handlers SiteFooter
##Error msg:
Invoke-PnPSiteTemplate: Cannot open "/sites/DepartementTemplate/SitePages/Vision-and-Priorities.aspx": no such file or folder.
##Expected behavior
There should be a replacing of the FooterLink URL source to the destination or no error and invalid links to manually edit.
The bug is not there for the navigation which correctly handle the replacement of the source to the destination.
##Temporary workaround:
for ($i = 0; $i -lt $template.Footer.FooterLinks.Count; $i++)
{
$template.Footer.FooterLinks[$i].Url = $template.Footer.FooterLinks[$i].Url.Replace("/sites/DepartementTemplate", "/sites/DepartementTemplateV2")
}
##Environment details (development & target environment)
PNP version: 2.3.0
OS: Windows 11
PSVersion: 7.4
PSEdition: Core