SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.23k stars 992 forks source link

Navigated event is not fired correctly on new page creation #9772

Open larrasap opened 1 week ago

larrasap commented 1 week ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Site designs & site scripts

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

Navigation event is not fired correctly on new page creation. When the page is saved it is directed to the recycle bin. In the recycle bin it ends up duplicated in two different formats and folders. In the recycle bin there are 2 original locations:

  1. tenant/sites/nameofthesite/SitePages (the correct location) in aspx format
  2. tenant/sites/nameofthesite/SitePages/News (the wrong location) in unknown format

I have deleted the folder location at: tenant/sites/nameofthesite/SitePages/News location but it reappears when a new page is created.

When running Get-SPOSite -Template REDIRECTSITE#0 the url above is not listed.

Steps to reproduce

  1. Create new page
  2. Save new page (/sites/nameofthepage/_api/sitepages/page(637)/SavePage

console_error recyclebin_error

Expected behavior

When Creating a new page (or news post) the url is "SitePages/newpage.aspx?Mode=Edit" Then to a generated the page the URL changes to e.g "SitePages/nmorjnzr.aspx?Mode=Edit" Then to whatever title set in the page e.g "SitePages/addedpage.aspx"

larrasap commented 1 week ago

{"odata.error":{"code":"-1, Microsoft.SharePoint.Client.ClientServiceException","message":{"lang":"en-US","value":"Item does not exist. It may have been deleted by another user."}}}