-
Hello, I am trying to convert some classic Wiki Publishing Pages to modern pages but I'm getting a 'Page does not exist' error when running the following code: ConvertTo-PnPPage -Identity "Enable Advanced Search.aspx" -Library "Pages" -TargetWebUrl "[URL]" -PublishingPage $true
We are trying to send the pages to a modern Team Site. The page name in question does exist, all pages in this library seem to have this issue. We have also tried pages in other sites and even other tenants and get the same issue. Any assistance would be much appreciated. I am happy to provide any further information as needed. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It looks like my problem was being caused by using the "-PublishingPages $true" parameter. Using just "-PublishingPages" was causing a separate error ("The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."), but it turns out that it still correctly converts the page. That error appears to be caused by a lack of copying across mandatory metadata, which can be rectified using the -CopyPageMetadata parameter. |
Beta Was this translation helpful? Give feedback.
It looks like my problem was being caused by using the "-PublishingPages $true" parameter.
Using just "-PublishingPages" was causing a separate error ("The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested."), but it turns out that it still correctly converts the page. That error appears to be caused by a lack of copying across mandatory metadata, which can be rectified using the -CopyPageMetadata parameter.