Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Worker redirect page to error when ID is set don't exist or when List param is set without ID param #9947

Open
1 of 9 tasks
Youssef-El-Garmit opened this issue Oct 1, 2024 · 1 comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@Youssef-El-Garmit
Copy link

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

Windows

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

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

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

Hello

Issue Summary: When modifying the NewFormUrl in SharePoint Online with a custom URL, the parameters List, Source, and ContentTypeId are automatically appended to the URL when clicking on a new item in the list. However, this results in an error on the new form page because it attempts to retrieve an Item ID that does not exist, likely due to a service worker issue. Additionally, adding an ID parameter to any page URL for custom use also results in an error.

Steps to Reproduce:

Modify the NewFormUrl with a custom URL.
Click on a new item in the list where the content type has been changed.
Observe that the URL includes the parameters List, Source, and ContentTypeId.
Notice the error on the new form page as it tries to fetch a non-existent Item ID.
Add an ID parameter (e.g., ID=23) to any page URL and observe the resulting error.
Expected Behavior: The new form page should load without attempting to retrieve an Item ID, allowing users to create new items without encountering errors. Additionally, adding an ID parameter to any page URL should not result in an error.

Actual Behavior: The new form page displays an error because it tries to get an Item ID that does not exist in the new form context. Similarly, adding an ID parameter to any page URL results in an error.

Additional Information: This issue appears to be related to the service worker handling the request. Any insights or fixes would be greatly appreciated.

Steps to reproduce

1.Add for example ?ID=999999 in any page
2.You will have an error

1.Add a param ?List={PUT HERE REAL LIST GUID} in any page without ID param and you will have an error

Expected behavior

The page should display, so that i can display my custom new form webpart

And in the case of ID, if we are not in the contexte of a list the page should display so that i manage the error my self

@Youssef-El-Garmit Youssef-El-Garmit added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Oct 1, 2024
@Youssef-El-Garmit
Copy link
Author

Capture d'écran 2024-10-02 013322 Capture d'écran 2024-10-02 013553

@VesaJuvonen VesaJuvonen added the Needs: Triage 🔍 Awaiting categorization and initial review. label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

2 participants