pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
415 stars 642 forks source link

Webparts on publishing pages not updating #2567

Open waaromikniet opened 4 years ago

waaromikniet commented 4 years ago

Category

[x ] Bug [ ] Enhancement

Environment

[ ] Office 365 / SharePoint Online [ x] SharePoint 2016 [ x] SharePoint 2013

If SharePoint on-premises, what's exact CU version: Jan 2020

Expected or Desired Behavior

When I update a webpart for my page and deploy my template the webparts should be updated on the page.

Observed Behavior

When I update a webpart for my page and deploy my template the webparts are not updated on the page.

Steps to Reproduce

I have the following publishing page in my template. Only part that is causing the issue is shown.

        <!-- page layouts -->
        <pnp:File Src="PageLayouts\HomepageLayout.aspx" Folder="{masterpagecatalog}" Overwrite="true" Level="Published">
          <pnp:Properties>
            <pnp:Property Key="ContentTypeId" Value="{contenttypeid:Pagina-indeling}" />
            <pnp:Property Key="MasterPageDescription" Value="homepage layout" />
            <pnp:Property Key="Title" Value="homepage layout" />
            <pnp:Property Key="PublishingPreviewImage" Value="{masterpagecatalog}/nl-NL/Preview Images/ArticleRight.png, {site}{masterpagecatalog}/nl-NL/Preview Images/ArticleRight.png" />
            <pnp:Property Key="PublishingAssociatedContentType" Value=";#HomePage;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D400B627D7519515DB4FBFC1B8AC16A5E973;#" />
          </pnp:Properties>
        </pnp:File>

        <!--pages-->
        <pnp:File Src="Pages\Home.aspx" Folder="{site}/Paginas" Overwrite="true" Level="Published"  >
          <pnp:Properties>
            <pnp:Property Key="ContentTypeId" Value="{contenttypeid:HomePage}" />
            <pnp:Property Key="Title" Value="homepage" />
            <pnp:Property Key="PublishingPageLayout" Value="{masterpagecatalog}/HomepageLayout.aspx, Project dossier homepage layout" />
            <pnp:Property Key="PublishingIsFurlPage" Value="False" />
            <pnp:Property Key="PublishingRollupImage" Value="{site}/Style Library/Gasunie/GasuniePSshadow.jpg"/>
          </pnp:Properties>
          <pnp:WebParts>
            <pnp:WebPart Title="Inhoudseditor A" Zone="MiddleLeftZone" Order="0">
              <pnp:Contents>
                <WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2">
                  <Title>Inhoudseditor A</Title>
                  <FrameType>None</FrameType>
                  <Description />
                  <IsIncluded>true</IsIncluded>
                  <ZoneID>MiddleLeftZone</ZoneID>
                  <PartOrder>0</PartOrder>
                  <FrameState>Normal</FrameState>
                  <Height />
                  <Width />
                  <AllowRemove>true</AllowRemove>
                  <AllowZoneChange>true</AllowZoneChange>
                  <AllowMinimize>true</AllowMinimize>
                  <AllowConnect>true</AllowConnect>
                  <AllowEdit>true</AllowEdit>
                  <AllowHide>true</AllowHide>
                  <IsVisible>true</IsVisible>
                  <DetailLink />
                  <HelpLink />
                  <HelpMode>Modeless</HelpMode>
                  <Dir>Default</Dir>
                  <PartImageSmall />
                  <MissingAssembly>Kan dit webonderdeel niet importeren.</MissingAssembly>
                  <PartImageLarge>/_layouts/15/images/mscontl.gif</PartImageLarge>
                  <IsIncludedFilter />
                  <Assembly>Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                  <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
                  <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
                  <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[​&#160;<br/><img src="{site}/Style%20Library/images/image.jpg" alt="" style="margin: 5px;"/>]]></Content>
                  <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
                </WebPart>
              </pnp:Contents>
            </pnp:WebPart>

I change the content of the content editor but changes are not deployed when running template.

ghost commented 4 years ago

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

GuptaAnubhav commented 3 years ago

Any update on this as I am also facing the same issue. Publishing page contents are not updating while applying the template.