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

Fix Get-PnPSiteTEmplate not exporting language resource files #4326

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

jackpoz
Copy link
Contributor

@jackpoz jackpoz commented Sep 21, 2024

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #4300 and pnp/pnpframework#999

What is in this Pull Request ?

This PR fixes Get-PnPSiteTemplate not exporting language resource files when using .xml templates as output format and passing -PersistMultiLanguageResources parameter. This happened due to a copypaste error from the code above related to ContentTypeGroups, which is not relevant for -PersistMultiLanguageResources parameter.

Templates with .pnp extension didn't have this issue as PersistMultiLanguageResources is always set to true in that case.

How to reproduce steps:

  • Go to Site Settings and then Language Settings. You can use /_layouts/15/muisetng.aspx relative url to reach the page.
  • Enable "Enable translation into multiple languages"
  • Add an additional language
  • Export a template with -PersistMultiLanguageResources parameter
Get-PnPSiteTemplate -Out "Template.xml" -PersistBrandingFiles -IncludeAllPages -PersistMultiLanguageResources

This is the result with this PR:
image

@gautamdsheth
Copy link
Collaborator

Merged it !

Thanks a lot @jackpoz , much appreciated.

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 this pull request may close these issues.

[BUG]Get-PnPSiteTemplate -PersistMultiLanguageResources can't create resource files
2 participants