Skip to content

Saving a page automatically adds a fixed-width section with a PageTitle component #1718

@federicodibe

Description

@federicodibe

Category

  • Bug

Describe the bug

When saving a modern page using PnP Core SDK, an unexpected layout modification occurs:
a fixed-width section with a banner (PageTitle web component) is automatically added at the top of the page.

Steps to reproduce

  1. Create a new Site Page through Sharepoint Online interface.
  2. Remove the default Banner WebPart and default Section.
  3. Add new Section of any type with a any component inside it.
  4. Save the page.
  5. At this point, when load & save the page throught the C# code:
var pages = await pnpContext.Web.GetPagesAsync(originPath);
var page = pages?.FirstOrDefault();
await page?.SaveAsync();

a fixed-width section is automatically added at the top of the page, containing a PageTitle component.

Expected behavior

The page structure should remain unchanged unless explicitly modified by the developer.
No automatic insertion of PageTitle/Banner and/or new sections.

Environment details (development & target environment)

PnP.Core.Auth version 1.15.0 - Nightly+65d212bef053486697d686e37a57db9e1701779f
PnP.Core version 1.15.0 - Nightly+65d212bef053486697d686e37a57db9e1701779f
.NET 8

Thanks you

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions