Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-PnPSiteTemplate issue with FooterLinks #957

Open
levesquesamuel opened this issue Dec 22, 2023 · 0 comments · May be fixed by #976
Open

Invoke-PnPSiteTemplate issue with FooterLinks #957

levesquesamuel opened this issue Dec 22, 2023 · 0 comments · May be fixed by #976

Comments

@levesquesamuel
Copy link

levesquesamuel commented Dec 22, 2023

##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

nils-a added a commit to nils-a-forks/pnpframework that referenced this issue Jan 27, 2024
@nils-a nils-a linked a pull request Jan 27, 2024 that will close this issue
nils-a added a commit to nils-a-forks/pnpframework that referenced this issue Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant