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

ClientSidePage.Header.TextAlignment is not applied when applying a provisioning template #2465

Open zplume opened 4 years ago

zplume commented 4 years ago

Category

[x] Bug [ ] Enhancement

Environment

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

Expected or Desired Behavior

When applying PnP provisioning templates (e.g. via Apply-PnPProvisioningTemplate PS cmdlet), the ClientSidePage.Header.TextAlignment value (e.g. "Left") is applied to the provisioned page's PageHeader.TextAlignment property.

Observed Behavior

The TextAlignment atribute of the ClientSidePage.Header element is ignored when the provisioning template is applied and the page is created or updated. In the tested template, the Header.TextAlignment attribute value = "Left" and the ClientSidePage.Overwrite attribute value = "true".

Steps to Reproduce

<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2019/03/ProvisioningSchema">
  <pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.11.1907.0, Culture=neutral, PublicKeyToken=5e633289e95c321a" />
  <pnp:Templates ID="CONTAINER-">
    <pnp:ProvisioningTemplate Version="0" Scope="Undefined" ID="TEMPLATE">
      <pnp:ClientSidePages>
        <pnp:ClientSidePage PageName="pnp-text-align-test.aspx" PromoteAsNewsArticle="false" PromoteAsTemplate="false" Overwrite="true" EnableComments="false" Title="PnP text align test">
          <pnp:Sections>
            <pnp:Section Order="1" Type="TwoColumnLeft">
              <pnp:Controls>
              </pnp:Controls>
            </pnp:Section>
            <pnp:Section Order="2" Type="OneColumn">
              <pnp:Controls>
              </pnp:Controls>
            </pnp:Section>
          </pnp:Sections>
          <pnp:Header Type="Custom" ServerRelativeImageUrl="/_LAYOUTS/IMAGES/SLEEKTEMPLATEIMAGETILE.JPG" TranslateX="48.3344219464402" TranslateY="55.7142857142857" LayoutType="FullWidthImage" TextAlignment="Left" ShowTopicHeader="false" ShowPublishDate="false" TopicHeader="" AlternativeText="" Authors="[]" AuthorByLine="[]" AuthorByLineId="-1" />
        </pnp:ClientSidePage>
      </pnp:ClientSidePages>
    </pnp:ProvisioningTemplate>
  </pnp:Templates>
</pnp:Provisioning>

Thanks!

ghost commented 4 years ago

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