pnp / pnp/pnpframework

[BUG] Empty Search Settings when exported via Get-PnPSiteTemplate with configuration

Open
#953 2 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

Issue

Using Version 2.2.0 of PnP Powershell module
Powershell v 7.3.0

Preparation

Connect-PnPOnline -Url [my-sponline-tenant] -Interactive
The connecting user is site collection administrator, but an external guest user.

Expected behavior

Get-PnPSiteTemplate -Handlers SearchSettings -IncludeSearchConfiguration -Out output-search-handler.xml

Contents of searchconfig.json

{
    "$schema": "https://aka.ms/sppnp-extract-configuration-schema",
        "handlers": [
            "SearchSettings"
        ],
        "searchSettings": {
            "include": true  
        }
    }

Get-PnPSiteTemplate -Configuration C:\path\searchconfig.json -Out output-search-config.xml

I expect the contents of output-search-handler.xml and output-search-config.xml to be identical.

Actual behavior
  1. output-search-handler.xml has correct exported search settings
  2. output-search-config.xml has empty exported search settings

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 issue with the two Get-PnPSiteTemplate commands, using SearchSettings and the provided searchconfig.json, then compare output-search-handler.xml with output-search-config.xml. Trace the configuration path that handles SearchSettings and IncludeSearchConfiguration; done means both commands export equivalent search settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.