Skip to content

Bug report: Issues with spo page text add command #6708

@mkm17

Description

@mkm17

Priority

(Medium) I'm annoyed but I'll live

Description

In reality, the issue is connected with the Page.ts file. When we add a new text web part to a section, some elements of the page are removed.

  1. Empty sections added via the UI are removed (this doesn't happen when using spo page section add). These sections get controlType: 3 (in our spo page section add command controlType is empty)), which is not handled in the conversion function.
  2. When a section uses one of the standard zone emphases (None, Neutral, Soft, Strong background), it is changed to None after saving.
  3. Vertical sections are not recognized, after saving, this type of section disappears.

Steps to reproduce

To reproduce the issues, simply follow the steps below:

  1. Create an empty section using the UI, then use the spo page text add command.
  2. Create a section with a standard zone emphasis (e.g. None, Soft, or Strong), then use the spo page text add command.
  3. Create a page with a vertical section, then use the spo page text add command.

Expected results

All elements should stay after using spo page text add

Actual results

As described in the description.

Diagnostics

No response

CLI for Microsoft 365 version

v10.6.0

nodejs version

v22.14.0

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions