Skip to content

[BUG] Export-PnPPage doesn't create info about the client side page if certain section backgrounds are used. #4897

Open

Description

@darktoasteroven

Reporting an Issue or Missing Feature

If you use Export-PnPPage on a page that has a section background other than the first few very simple ones the exported xml file does not include a client side page object.

Expected behavior

When you run Export-PnPPage -Force -Identity $PageName -Out $migrationFileLocation -PersistBrandingFiles you should generate a file that includes all of the info to restore the page using Invoke-PnPSiteTemplate -Path $migrationFileLocation

Actual behavior

You get an xml file without the clientsidepage section

Image

Steps to reproduce behavior

Export-PnPPage -Force -Identity $PageName -Out $migrationFileLocation -PersistBrandingFiles

What is the version of the Cmdlet module you are running?

3.1.0

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Activity

  1. AndyTukeatSoftcat commented on May 8, 2025

    @AndyTukeatSoftcat

    I've just hit this too. Have you worked out what aspect of the background causes it?

  2. ranaictiu commented on May 19, 2025

    @ranaictiu

    Having the same issue as well. Would appreciate if this can be fixed ASAP.

  3. AndyTukeatSoftcat commented on May 21, 2025

    @AndyTukeatSoftcat

    I hate to be the one who moans about something that a lot of people do for free, but copying pages between sites is as pretty fundamental as you get for a SharePoint management tool. Why is this still an issue one PnP v3? I'm on a major project and this is causing loads of extra work. Sometimes it feels like developers for Microsoft get fixated on the new 'cool' stuff and forget about fixing the basics which are way more important to most people

  4. ranaictiu commented on May 21, 2025

    @ranaictiu

    I hate to be the one who moans about something that a lot of people do for free, but copying pages between sites is as pretty fundamental as you get for a SharePoint management tool. Why is this still an issue one PnP v3? I'm on a major project and this is causing loads of extra work. Sometimes it feels like developers for Microsoft get fixated on the new 'cool' stuff and forget about fixing the basics which are way more important to most people

    We are feeling SharePoint online gone downhill in last few years. I've been raised at least five tickets with Microsoft in last year or so, related to SharePoint. Been working with MS tech for nearly 20 years, I've not raised five tickets in first 19 years. PnP is always catching up with SharePoint deployments, Power Platform doesn't work properly with SharePoint, only 12 lookup columns supported, Form customisation nearly impossible (miss Nintext forms).

  5. SteveJonasson commented on Jun 4, 2025

    @SteveJonasson

    We are feeling SharePoint online gone downhill in last few years. I've been raised at least five tickets with Microsoft in last year or so, related to SharePoint. Been working with MS tech for nearly 20 years, I've not raised five tickets in first 19 years. PnP is always catching up with SharePoint deployments, Power Platform doesn't work properly with SharePoint, only 12 lookup columns supported, Form customisation nearly impossible (miss Nintext forms).

    Hello guys, I have the same issue. I ran into the same issue today. Trying to export the page with.

    Export-PnPPage Home.aspx

    It is returned empty until I remove the background from one section on the canvas. When the background is removed, the Page is correct. Now I can Invoke-PnPSiteTemplate to another site.

  6. aaleksejev commented on Jun 5, 2025

    @aaleksejev

    Hello guys, I have the same issue. I ran into the same issue today. Trying to export the page with.

    Export-PnPPage Home.aspx

    It is returned empty until I remove the background from one section on the canvas. When the background is removed, the Page is correct. Now I can Invoke-PnPSiteTemplate to another site.

    Thank you good sir! Same issue for me but your workaround was spot on.

    From my end it appears any of the strong/solid colored backgrounds will work, but choosing any of the faded background will result in the page returning empty with Export-PnPPage.

    I did not end up testing any uploaded background images.

    Image

  7. kachihro commented on Oct 3, 2025

    @kachihro
    Contributor

    Have just encountered this issue also - nearly SIX months, and no answer.

    1. I've checked the listItem properties - and the data within $i.FieldValues.CanvasContent1
    2. Compared against a page WITH the background - and WITHOUT
    3. There's a new section added "data-sp-webpartdata"
    4. This is a JSON-encoded section, related to 'zoneBackground'
    5. This is the bit that's causing issues - unclear WHY, as yet
    Image
  8. kachihro commented on Oct 3, 2025

    @kachihro
    Contributor
  9. kachihro commented on Oct 4, 2025

    @kachihro
    Contributor

    Hello guys, I have the same issue. I ran into the same issue today. Trying to export the page with.
    Export-PnPPage Home.aspx
    It is returned empty until I remove the background from one section on the canvas. When the background is removed, the Page is correct. Now I can Invoke-PnPSiteTemplate to another site.

    Thank you good sir! Same issue for me but your workaround was spot on.

    From my end it appears any of the strong/solid colored backgrounds will work, but choosing any of the faded background will result in the page returning empty with Export-PnPPage.

    I did not end up testing any uploaded background images.

    Image

    ===============

    The issue looks to be resolved - I used the latest DEV branch (in Visual Studio 2022) - and it works !

    Also - I then tried the latest NIGHTLY build of PNP.PowerShell (3.1.172). And it works ! ✅

    There have been a lot of changes over the last six months - since 3.1.0 was released.

    1. Check your version of PNP PowerShell ;
      Get-Module -Name PnP.PowerShell -ListAvailable | select Name, Version

    2. It will probably be 3.1.0

    3. Update to use the newer release (3.1.172)

    4. Uninstall first ;
      uninstall-Module -Name "PnP.PowerShell"

    5. Then the nightly build ;
      Install-Module PnP.PowerShell -AllowPrerelease -SkipPublisherCheck

    HTH

  10. gautamdsheth commented on Aug 10, 2026

    @gautamdsheth
    Collaborator

    Is this issue still there with the latest releases ? There have been quite a few changes and bug fixes around this , should be fixed I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions