pnp / pnp/pnpframework

ConvertTo-PnPPage IncludeVerticalColumns throws Index out of Range error

Open
#595 2 comments 1 reaction 1 assignee View on GitHub

@jansenbe is already working on this.

Since Mar 17, 2022.

area: page transformation 🦾 question
Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

When trying to do a page modernization, ConvertTo-PnPPage throws an error when we specify IncludeVerticalColumn = true in the page layout mapping file. Header and Metadata tags have been removed from the sample below.

<PageLayout Name="SomePageLayout" AssociatedContentType="" PageLayoutTemplate="AutoDetect" IncludeVerticalColumn="true" PageHeader="Custom">
      <SectionEmphasis VerticalColumnEmphasis="Soft">
      </SectionEmphasis>
      <WebParts>
        <Field Name="PublishingPageContent" TargetWebPart="SharePointPnP.Modernization.WikiTextPart" Row="1" Column="1" Order="1">
          <Property Name="Text" Type="string" />
        </Field>
      </WebParts>
      <WebPartZones>
        <WebPartZone ZoneIndex="0" ZoneId="BottomZone" Row="1" Column="1" />
      </WebPartZones>
</PageLayout>

Error Message:
image

Command Run:

ConvertTo-PnPPage -RemoveEmptySectionsAndColumns:$false -Identity $page.FieldValues.FileLeafRef   -TargetWebUrl $targetUrl -CopyPageMetadata -PageLayoutMapping "$($folderLocation)\$($mappingName)"   -PublishingPage -ErrorAction Stop 

Expected Outcome:
The page modernization works and adds a blank vertical column to the page.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.