pnp / sp-starter-kit

Modern SharePoint Starter Kit - End-to-end showcase solution to get started with modern experiences.
MIT License
759 stars 534 forks source link

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

Open pk091990 opened 3 years ago

pk091990 commented 3 years ago

Category

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)

ghost commented 3 years ago

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

bcameron1231 commented 3 years ago

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

bcameron1231 commented 3 years ago

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

eoverfield commented 3 years ago

@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.

bcameron1231 commented 3 years ago

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

pk091990 commented 3 years ago

Hi @bcameron1231 , Any update on this ?