sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Navigated event is not fired correctly on new page creation

Open larrasap opened this issue 1 year ago • 1 comments

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

  • [ ] 💥 Internet Explorer
  • [ ] 💥 Microsoft Edge
  • [X] 💥 Google Chrome
  • [X] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • browser chrome and firefox

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 avatar Jun 26 '24 14:06 larrasap

{"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."}}}

larrasap avatar Jun 27 '24 07:06 larrasap

+1 on this when in targeted release

tallday avatar Aug 20 '24 04:08 tallday

Hello @larrasap, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

Ashlesha-MSFT avatar Jun 13 '25 10:06 Ashlesha-MSFT

@larrasap, the current repro steps are a bit unclear, and I’d appreciate it if you could help clarify a few points:

  1. Are you using a custom site script, site design, or page template when creating the new page?
  2. When exactly does the page appear duplicated in the Recycle Bin — is it right after saving, publishing, or navigating away?
  3. Could you please provide a clear and complete step-by-step flow (including expected vs actual behavior) to help reproduce this more accurately?

Ashlesha-MSFT avatar Jun 13 '25 11:06 Ashlesha-MSFT

Dear Ashlesha, I had a ticket with Microsoft Support for a few months but managed to fix it myself so you can close this case. There was a Power Automate flow disturbing the "events".

Sincerely Lina

Lina Arras

Executive Assistant

[signatureImage]

Part of DER Touristik Nordic

Box 45439 · SE-104 31 Stockholm, Sweden

Visiting address: Ynglingagatan 2 Mobile: +46 735957571

Mail: @.***

Join us at: www.apollo.sehttp://www.apollo.se/ · www.facebook.com/ApolloSverigehttp://www.facebook.com/ApolloSverige · instagram.com/apollosverigehttp://instagram.com/apollosverige


Från: Ashlesha-MSFT @.> Skickat: Friday, June 13, 2025 1:35:48 PM Till: SharePoint/sp-dev-docs @.> Kopia: Arras, Lina @.>; Mention @.> Ämne: Re: [SharePoint/sp-dev-docs] Navigated event is not fired correctly on new page creation (Issue #9772)

[https://avatars.githubusercontent.com/u/176673409?s=20&v=4]Ashlesha-MSFT left a comment (SharePoint/sp-dev-docs#9772)https://github.com/SharePoint/sp-dev-docs/issues/9772#issuecomment-2970118014

@larrasaphttps://github.com/larrasap, the current repro steps are a bit unclear, and I’d appreciate it if you could help clarify a few points:

  1. Are you using a custom site script, site design, or page template when creating the new page?
  2. When exactly does the page appear duplicated in the Recycle Bin — is it right after saving, publishing, or navigating away?
  3. Could you please provide a clear and complete step-by-step flow (including expected vs actual behavior) to help reproduce this more accurately?

— Reply to this email directly, view it on GitHubhttps://github.com/SharePoint/sp-dev-docs/issues/9772#issuecomment-2970118014, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A6HE3Z3Q4DCTEHTJNPRTBBD3DKZRJAVCNFSM6AAAAAB7HZCHS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNZQGEYTQMBRGQ. You are receiving this because you were mentioned.Message ID: @.***>

larrasap avatar Jun 13 '25 13:06 larrasap

Thanks for confirmation! It has been confirmed by the user that the issue has been resolved and no further action is required.

Closing the case accordingly.

Ashlesha-MSFT avatar Jun 13 '25 13:06 Ashlesha-MSFT