pnp / pnp/pnpframework

Invoke-PnPSiteTemplate messing up / and \ in current nightly

Open
#930 0 comments 0 reactions 0 assignees View on GitHub

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:
2

Even if correct in XML
1

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.