Invoke-PnPSiteTemplate messing up / and \ in current nightly
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Category
- Bug
Describe the bug
Invoke-PnPSiteTemplate -Path "./tmp/pages/de/Page.xml" fails with "Object reference not set to an instance of an object." in Version 2.2.104-nightly when PageName in Page.xml is "folder1/folder2/Page.aspx" contains more than one subfolder. I guess this is the problem, slash and backslah messed up:
Even if correct in XML
Expected behavior
No Error, as using just one subfolder, like ./tmp/pages/Page.xml with PageName in Page.xml is "folder1/Page.aspx"
Environment details (development & target environment)
- PNP version: 2.2.104-nightly
- OS: Windows 11
- PSVersion: 7.3.8
- PSEdition: Core
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure through Invoke-PnPSiteTemplate using the Page.xml example and a PageName containing multiple subfolders, such as folder1/folder2/Page.aspx. Trace how the template processing handles slash and backslash separators, then verify that nested paths complete without a null-reference error while the single-subfolder case remains working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100