SharePoint / SharePoint/sp-dev-docs

SPFx Form Customizer Edit/View forms fail with "[object Object]" JSON parse error on Turkish (tr-TR) locale sites

Open
#10,749 7 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Apr 1, 2026.

area:spfx area:spfx-extensions area:spfx-in-lists Needs: Author Feedback sharepoint-developer-support type:bug-confirmed
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

macOS

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
  • SPFx version: 1.22.2 (also reproduced on older versions with gulp)
  • Node.js version: 22.x
  • Site language: Turkish (tr-TR)
Describe the bug / error

Form Customizer extensions fail to load Edit and View forms on SharePoint sites with Turkish (tr-TR) regional settings. The same Form Customizer works perfectly on sites with English (en-US) regional settings.

Steps to reproduce

The error occurs before the "Load debug scripts" dialog appears, meaning the issue is in SharePoint's internal URL/parameter parsing, not in the custom code.

Key findings:

  • ✅ New Form works on both EN and TR sites
  • ✅ Edit/View Form works on EN sites
  • ❌ Edit/View Form fails on TR sites
  • The issue occurs with both gulp serve (older SPFx) and heft start (SPFx 1.22+)
  • A completely vanilla/default Form Customizer (no code changes) also fails on TR sites
  • Changing site regional settings from TR to EN immediately fixes the issue
Steps to reproduce
  1. Create a SharePoint site with Turkish (tr-TR) regional settings
  2. Create a custom list with at least one item
  3. Create a new SPFx Form Customizer project (vanilla, no modifications)
  4. Configure [serve.json] for Edit or View form with a valid item ID
  5. Run gulp serve or heft serve
  6. Observe the error - "Load debug scripts" dialog never appears

To verify it's a locale issue:

  1. Change the site's regional settings to English (en-US)
  2. Run the same serve command
  3. The form now loads correctly
Expected behavior

Form Customizer Edit and View forms should work regardless of the site's regional/language settings.

Workaround

Change site regional settings from Turkish to English. This is not acceptable for production sites targeting Turkish users.

Additional context

The error "[object Object]" is not valid JSON suggests that somewhere in SharePoint's internal code, an object is being converted to string (resulting in "[object Object]") and then parsed as JSON, which fails.

This may be related to how URL parameters (especially ID or properties) are serialized/deserialized in different locales.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.