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

Duplicate RootFolder parameter in form URL from Classic list views

Open vladigubler opened this issue 1 year ago • 12 comments

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
  • [x] 💥 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 version : latest Edge, Chrome and Firefox SPFx version: 1.15 Node.js version: 14.21.3 Form customizer opened from Classic list view

Describe the bug / error

We noticed the issue around the middle of last week. We are using a SPFx form customizer. When you click on New button from a Classic list view, it now generates a URL with duplicate RootFolder URL:

https://infowise.sharepoint.com/_layouts/15/SPListForm.aspx?PageType=8&List=ebec3287%2De769%2D4fc8%2Da57e%2D498c9a5e3a6a&Source=https%3A%2F%2Finfowise%2Esharepoint%2Ecom%2FLists%2FItem%2520ID%2FAllItems%2Easpx%3Fsw%3Dbypass%26bypassReason%3Dabandoned%26startedResponseCatch%3Dtrue**&RootFolder=&Web=fc3a9161%2D2f40%2D481f%2D9515%2Df39f0e8df0c3&RootFolder=/Lists/Item%20ID**

The form page then loads when it's completely blank and it doesn't load the form customizer at all (no code is loaded or running). If you manually remove the first empty parameter, the form loads fine. We suspect that there was some recent update on the MS side that broke this functionality with the extra parameter.

Steps to reproduce

  1. Add a form customizer to a list
  2. Switch to Classic list view
  3. Click on New, empty page opens

Expected behavior

It shouldn't be passing duplicate parameters and the form should open correctly. This is how it looks when the empty RootFolder parameter is present:

Image Once I manually remove it from the URL: Image

vladigubler avatar Jul 28 '25 14:07 vladigubler

This is where it fails:

Image The rootFolder property comes in as "undefined" when the URL parameter is duplicated. If this helps.

vladigubler avatar Jul 28 '25 14:07 vladigubler

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

Ashlesha-MSFT avatar Jul 29 '25 04:07 Ashlesha-MSFT

@vladigubler, Thanks for reporting this. I’ve tested the scenario in my tenant using a similar SPFx form customizer from a Classic list view, but I’m unable to reproduce the issue — the RootFolder parameter does not appear duplicated in the URL, and the custom form loads as expected.

To help troubleshoot further, could you please share your serve.json configuration (with any sensitive info redacted)? That would help me replicate your setup more closely and see if the issue might be environment- or config-specific. https://github.com/user-attachments/assets/978be6a4-de4a-4742-8a1e-178dd013f6c4

Ashlesha-MSFT avatar Jul 29 '25 05:07 Ashlesha-MSFT

It has nothing to do with the customizer itself, it never even loads. I have two tenants, on one it works, on another it doesn't I tracked it down to this value within this framework JS file: sp-list-form-application-assembly_en-us_65c077022f3cac7b1722da811f98fc5d.js this.context.preloadedData.page?.Content (line 307) Where it works, this object contains a RootFolder property:

Image

And where it doesn't work, this property is missing:

Image

Interestingly, the page URL is similar and contains duplicate RootFolder parameter:

  1. https://infowise.sharepoint.com/_layouts/15/SPListForm.aspx?PageType=8&List=ebec3287%2De769%2D4fc8%2Da57e%2D498c9a5e3a6a&Source=https%3A%2F%2Finfowise%2Esharepoint%2Ecom%2FLists%2FItem%2520ID%2FAllItems%2Easpx&RootFolder=&Web=fc3a9161%2D2f40%2D481f%2D9515%2Df39f0e8df0c3&RootFolder=/Lists/Item%20ID - works
  2. https://infowisesolutionsltd.sharepoint.com/_layouts/15/SPListForm.aspx?PageType=8&List=77d62900%2D3793%2D484a%2Db028%2D1a3ed8512e54&Source=https%3A%2F%2Finfowisesolutionsltd%2Esharepoint%2Ecom%2FLists%2FLevel%252011%2FAllItems%2Easpx&RootFolder=&Web=ad7d6404%2Dc90b%2D4c36%2D9c6c%2D4ed631f2b6b9&RootFolder=/Lists/Level%2011 - doesn't work

vladigubler avatar Jul 29 '25 14:07 vladigubler

After digging a bit more, I can see that the problem originates already from the SPListForm.aspx itself. If you look at row #55, it parses a JSON string from the source of the page itself into an object: spClientSidePageContext=JSON.parse('{"user" : {"@odata.context":"https://info...

On one tenant, this JSON contain RootFolder property, on the other one it doesn't. When it doesn't contain it, the form doesn't load. I don't know why it's not present. Awaiting your response.

The full JSON string is too long, but the relevant part is when works: ..."PropertiesJson":"","PageType":8,"RootFolder":",/Lists/Item ID","Source":"https://infowise.sharepoint.com/Lists/Item%20ID/AllItems.aspx"} when doesn't work: ..."PropertiesJson":""} As you can see, all the properties after PropertiesJson are missing from the page.

vladigubler avatar Jul 29 '25 14:07 vladigubler

Any updates? We have several customers blocked from being able to enter data into SharePoint because of this. This is a very urgent matter!

vladigubler avatar Jul 30 '25 17:07 vladigubler

@vladigubler, We acknowledge the impact and urgency you've described. We’re in the process of connecting with the TAG engineering team to further analyze the behavior you’ve observed, especially the inconsistent presence of the RootFolder property in the page context.

In parallel, we’ll go ahead and raise a formal bug on our end based on your findings.

We’ll share updates here as soon as we have more information.

Ashlesha-MSFT avatar Jul 30 '25 17:07 Ashlesha-MSFT

I don't know if it helps but the following of our tenants work normally:

  • https://infowise.sharepoint.com
  • https://infowisedemo.sharepoint.com

But the following tenant is affected:

  • https://infowisesolutionsltd.sharepoint.com Hope it helps.

vladigubler avatar Jul 30 '25 18:07 vladigubler

As far as I can see now, all my tenants are working properly again. I also got reports from some of our customers that it's back to normal. So I'm guessing something was fixed on the MS side.

vladigubler avatar Aug 05 '25 15:08 vladigubler

@vladigubler, Thanks for the update. Could you please confirm if all tenants are now fully resolved, so the we can go ahead and close the issue?

Also, kindly take a moment to fill out the feedback form at the link below: https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR4mTPG34N0xHuJATbbeqmGlUMTJVMzY0TlAwNThWWlVCNFY4MExFNjNTUC4u&fsw=0

Ashlesha-MSFT avatar Aug 06 '25 15:08 Ashlesha-MSFT

Can't say for sure, the customers who got back to us indicated that it's ok now

vladigubler avatar Aug 07 '25 14:08 vladigubler

@vladigubler : thanks for reporting this issue. We're closing as this is now fixed.

jansenbe avatar Aug 14 '25 16:08 jansenbe