Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to provision page with PageTitle web part in full-width section #1038

Open
cwparsons opened this issue Jul 12, 2024 · 2 comments
Open

Comments

@cwparsons
Copy link

When exporting a newly created, blank page, the PageTitle web part is added to a OneColumnFullWidth section. When trying to provision this content, it fails, giving the error You cannot host text controls inside a one column full width section, only an image web part or hero web part are allowed.

I suspect it is due to changes with the New Banner web part.

Example XML from a newly created page:

<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2022/09/ProvisioningSchema">
  <pnp:Preferences Generator="PnP.Framework, Version=1.16.0.0, Culture=neutral, PublicKeyToken=0d501f89f11b748c" />
  <pnp:Templates ID="CONTAINER-TEMPLATE-2EF375AEC7E246118F0081FAA442F36E">
    <pnp:ProvisioningTemplate ID="TEMPLATE-2EF375AEC7E246118F0081FAA442F36E" Version="0" Scope="Undefined">
      <pnp:ClientSidePages>
        <pnp:ClientSidePage PromoteAsNewsArticle="false" PromoteAsTemplate="false" Overwrite="true" EnableComments="false" Title="Test" ThumbnailUrl="" PageName="Test.aspx">
          <pnp:Header Type="Default" LayoutType="FullWidthImage" ShowTopicHeader="false" ShowPublishDate="false" ShowBackgroundGradient="false" TopicHeader="" AlternativeText="" Authors="" AuthorByLineId="-1" />
          <pnp:Sections>
            <pnp:Section Order="1" Type="OneColumnFullWidth">
              <pnp:Controls>
                <pnp:CanvasControl WebPartType="PageTitle" JsonControlData="{&quot;id&quot;: &quot;cbe7b0a9-3504-44dd-a3a3-0e5cacd07788&quot;, &quot;instanceId&quot;: &quot;73058164-effa-4b27-be24-dd2759d41de0&quot;, &quot;title&quot;: &quot;Banner&quot;, &quot;description&quot;: &quot;Show a banner with title and author information&quot;, &quot;dataVersion&quot;: &quot;1.5&quot;, &quot;properties&quot;: {&quot;imageSourceType&quot;:2,&quot;title&quot;:&quot;Test&quot;,&quot;textAlignment&quot;:&quot;Left&quot;,&quot;showPublishDate&quot;:false,&quot;authors&quot;:[{&quot;id&quot;:&quot;i:0#.f|membership|[email protected]&quot;,&quot;upn&quot;:&quot;[email protected]&quot;,&quot;email&quot;:&quot;[email protected]&quot;,&quot;name&quot;:&quot;Name&quot;,&quot;role&quot;:&quot;&quot;}],&quot;showTopicHeader&quot;:false,&quot;authorByline&quot;:[&quot;i:0#.f|membership|[email protected]&quot;],&quot;layoutType&quot;:&quot;CutInShape&quot;,&quot;isFullWidth&quot;:true,&quot;topicHeader&quot;:&quot;&quot;,&quot;enableGradientEffect&quot;:true,&quot;isDecorative&quot;:true}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{&quot;imageSource&quot;:&quot;/_layouts/15/images/sleektemplateimagetile.jpg&quot;},&quot;links&quot;:{},&quot;customMetadata&quot;:{&quot;imageSource&quot;:{}}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {}}" ControlId="cbe7b0a9-3504-44dd-a3a3-0e5cacd07788" Order="1" Column="1" />
              </pnp:Controls>
            </pnp:Section>
            <pnp:Section Order="2" Type="OneColumn">
              <pnp:Controls>
                <pnp:CanvasControl WebPartType="Text" ControlId="1212fc8d-dd6b-408a-8d5d-9f1cc787efbb" Order="1" Column="1">
                  <pnp:CanvasControlProperties>
                    <pnp:CanvasControlProperty Key="Text" Value="" />
                  </pnp:CanvasControlProperties>
                </pnp:CanvasControl>
              </pnp:Controls>
            </pnp:Section>
          </pnp:Sections>
        </pnp:ClientSidePage>
      </pnp:ClientSidePages>
    </pnp:ProvisioningTemplate>
  </pnp:Templates>
</pnp:Provisioning>
@marcoschmucker
Copy link

We have the same thing on tenants where the new section possibilities and banner webparts are available - but not too many have that at this point of time.

Workaround: Remove the full width section in page templates, use a normal section with Text webpart. After provisioning make sure people add the full width section with banner. Not nice.

Any updates? @cwparsons

@dfrancoeur
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants