ConvertTo-PnPPage IncludeVerticalColumns throws Index out of Range error
Open
@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:

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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.