Skip to content

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

@RaistlinMY

Description

@RaistlinMY

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.

Metadata

Metadata

Assignees

Labels

Needs: Author FeedbackAwaiting response from the original poster of the issue. Marked as stale if no activity for 7 days.sharepoint-developer-supportsharepoint-developer-supporttype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions