pnp / pnp/pnpframework

ConvertTo-PnPPage : Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

Open
#682 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

I am migrating from Classic sites to Modern sites and I am trying to change the Home Page to Modern. This is the error message - -the script is simple:
$SiteURL="https://xxxx.sharepoint.com/sites/xxxx"
$ClassicPageName = "home.aspx"

Connect-PnPOnline $SiteURL -Interactive

ConvertTo-PnPPage -Identity $ClassicPageName -AddPageAcceptBanner

Can you please assist?

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.

Research direction

Start by reproducing the failure with the supplied ConvertTo-PnPPage command, the home.aspx identity, and the AddPageAcceptBanner option. Trace the ConvertTo-PnPPage entry point and page-conversion path; done means this migration scenario no longer raises the index-out-of-range error and its behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
tooling, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.