pnpframework icon indicating copy to clipboard operation
pnpframework copied to clipboard

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

Open CodingSinceThe80s opened this issue 1 year ago • 2 comments

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

CodingSinceThe80s avatar Dec 20 '23 12:12 CodingSinceThe80s

This issue should be moved to pnp/powershell, the error seems to be in GetSiteTemplate:

https://github.com/pnp/powershell/blob/d774dca91902fd34c660157c9b3e150e0e5ad950/src/Commands/Provisioning/Site/GetSiteTemplate.cs#L223

nils-a avatar Jan 29 '24 13:01 nils-a

This issue can be closed when https://github.com/pnp/powershell/pull/3741 is made available.

nils-a avatar Feb 09 '24 15:02 nils-a