sp-starter-kit icon indicating copy to clipboard operation
sp-starter-kit copied to clipboard

Starter Kit not adding oob/custom webparts to News pages with PnP.Powershell

Open pk091990 opened this issue 3 years ago • 6 comments

Category

  • [x] Bug

Describe the bug

Expected or Desired Behavior

Run the deploy kit v2 from here which provisions 3 sites. It should add oob text webparts for all News pages.

Observed Behavior

Run the deploy kit as it is without any change. Its not adding any OOB Text webparts in all 4 News Pages given in the xml. Also showing error when I tried to edit the page. Please see the screenshots for the reference. Same issue with custom webparts also.

image

image

Steps to Reproduce

Please run the script and open any News Page when script provisioning done. Webpart is not added. Show Error while editing the page.

Environment Details (Development & Target environment)

  • Starter kit version: v2
  • OS: Windows 10
  • Target Environment: SharePoint Online
  • Framework: [Node.js v6/v8/v10/v12]
  • PnPPowerShell Version : PnP.PowerShell 1.4.0
  • Browser(s): Chrome
  • Additional details: I've checked and its working fine with older version - SharePointPnPPowerShellOnline 3.20.2004.0.

pk091990 avatar Mar 26 '21 13:03 pk091990

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Mar 26 '21 13:03 ghost

Hi, thank you for the issue. I'll review this today.

bcameron1231 avatar Mar 30 '21 13:03 bcameron1231

Hi! I have reproduced this issue with the latest version of PnP PowerShell. Using a previous version of PnP PowerShell it still works correctly.

I have a suspicion that we'll need to put in an Issue over at the PnP PowerShell repository https://github.com/pnp/powershell

bcameron1231 avatar Mar 31 '21 19:03 bcameron1231

@bcameron1231 I wonder if the XML parsing has changed in the way clientside pages canvas controls for text, i.e.

<pnp:CanvasControl
  WebPartType="Text"
  ControlId="7819c9ed-fa21-4d71-9b84-71ef785c3dff" Order="2" Column="1">
  <pnp:CanvasControlProperties>
    <pnp:CanvasControlProperty 
      Key="Text"
      Value="&lt;p&gt;&lt;span class=&quot;fontColorThemePrimary&quot;&gt;&lt;span class=&quot;fontSizeMediumPlus&quot;&gt;&lt;strong&gt;BREATHTAKING VIDEOS &amp;amp; PHOTOS&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Contoso MARK8 is the first drone to offer an 8K HDR camera that tilts vertically at and angle of 180&lt;strong&gt;°&lt;/strong&gt;, combined with an up to 2.8X lossless zoom and dolly zoom effect.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fontColorBlueDark&quot;&gt;&lt;strong&gt;–&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;fontSizeMedium&quot;&gt;&lt;span class=&quot;fontColorBlueDark&quot;&gt;&lt;strong&gt;2.8X FULL HD ZOOM&lt;/strong&gt;&lt;/span&gt;&lt;br&gt;&lt;em&gt;Reveal your inner filmmaker&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;"
    />
  </pnp:CanvasControlProperties>
</pnp:CanvasControl>

Let's add to our backlog adding the controls by hand to a page, exporting a template using the latest version of PS, and see if that generates a new template the does work.

eoverfield avatar Mar 31 '21 22:03 eoverfield

Yup! Sounds good. I already started doing that and then got distracted. Will try and get a comparison of the news sections later today.

bcameron1231 avatar Apr 01 '21 14:04 bcameron1231

Hi @bcameron1231 , Any update on this ?

pk091990 avatar Jun 21 '21 06:06 pk091990