pnp / powershell

PnP PowerShell
https://pnp.github.io/powershell
MIT License
688 stars 351 forks source link

[BUG] Creating SingleWebPartAppPage using PnP Powershell does not allow to edit page #3749

Closed zensho-mjp closed 9 months ago

zensho-mjp commented 9 months ago

Hi everyone,

ISSUE :

Creating a Single WebPart App Page does not work using the PnP PowerShell Command. The created page is not editable. The button is not displayed. This is not a permission issue as I have checked it out already. The weirdest is that pages that were created manually without a script, and sharing the same page layout do not encounter this issue.

Expected behavior

Being able to edit the page, adding section, webpart, etc.

Actual behavior

The page is blank and does not have any buttons available, including the Edit button present on any pages under the right permission levels.

Steps to reproduce behavior

$Page = Add-PnPPage -Name $pageName -LayoutType SingleWebPartAppPage

Which operating system/environment are you running PnP PowerShell on?

Thank you for your help !

Maxime

a1mery commented 9 months ago

Hi,

From what I understand, this is not an issue. SingleWebPartAppPage cannot be edited by end users using a browser. This type of page is mainly used to host SharePoint Framework web parts or Microsoft Teams applications.

I guess what your looking for is something like that: $Page = Add-PnPPage -Name $pageName -LayoutType Article

More information here: Using single part app pages in SharePoint Online

zensho-mjp commented 9 months ago

Hi,

Yes, but Article does not span the entire page. Apparently, I first have to create the page as "Article", then add the webpart, then switch through powershell into a single webpart app page. It just seems to be a workaround to me.

Thank you for your response

gautamdsheth commented 9 months ago

Hi @zensho-mjp , as mentioned , this is by design. Need to create page with article layout first and then set it to SingeWebpartAppPage