pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

[BUG] ContentRoll/Highlighted content for documents cannot be added via PowerShell #2802

Open Wit4r7 opened 4 years ago

Wit4r7 commented 4 years ago

Reporting an Issue or Missing Feature

I'm trying to add a ContentRollUp (or Highlighted content) ClientSideWebpart for the document libary on my sites via Add-PnPClientSideWebPart.

Expected behavior

That a working webpart is added, as if I would create it manually. This means that the query is set to the Documents library and "any documents".

This is when I add it by hand. PnP2

Actual behavior

A suitable Web Part is added and the query settings themselves look good, but no documents are displayed. "We didn't find anything to show here". PnP

Steps to reproduce behavior

Add-PnPClientSideWebPart -Page $page -DefaultWebPartType "ContentRollup" -Section 1 -Column 1 -WebPartProperties @{layoutId=”Card”;title=”Recent documents”}

Set-PnPClientSideWebPart -Page $page -Identity $temp.InstanceId -PropertiesJson $jsonContent

The result is visible in the screenshot above.

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.22.2006.2

How did you install the PnP-PowerShell Cmdlets?