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

SPFx Field Customizer stopped working on February 3, 2025 #10101

Open
1 of 9 tasks
ruby-yama opened this issue Feb 4, 2025 · 2 comments
Open
1 of 9 tasks

SPFx Field Customizer stopped working on February 3, 2025 #10101

ruby-yama opened this issue Feb 4, 2025 · 2 comments
Labels
type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@ruby-yama
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

  • SPFx version 1.20.0
  • Node.js version v18.20.5

Describe the bug / error

Hello,

I have been using an SPFx Field Customizer (for a group field) in a SharePoint list, and it was working fine until last week. However, as of today (February 3, 2025), it has stopped working. The custom field no longer renders.

I suspect this might be due to a SharePoint update, but I would appreciate any insights or solutions to resolve this issue.

From debugging, it seems that the onInit method is not being triggered. Could this be a bug, or is there an update-related issue affecting SPFx Field Customizers?

Any guidance or workarounds would be greatly appreciated.

Thank you!

Steps to reproduce

1.Run gulp serve to start the SPFx Field Customizer.
2.The onInit method is expected to execute, but it does not trigger.
3.Before reaching onInit, the process fails without logging anything to the console.

Expected behavior

The toggle field should be rendered correctly in the SharePoint list.

@ruby-yama ruby-yama added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Feb 4, 2025
@Mazecreator
Copy link

I am having a similar issue, I wrote it up on probably the wrong issues list. I will copy it here as there is debugging information as well as the DEMO in the training has the same failure to help with reproducing the error and debugging:

=========== Added rather than creating a new ticket as it appears related ============

SharePoint/sp-dev-training-spfx-extensions#89

TITLE: 03-listviewcommandset Fails to add COMMANDs and fire onInit()

I was having problems with several SPFx Extentions with ListViewCommandSet type where the onInit() wouldn't fire. After spending a long time trying to debug, make sure IDs match, etc and rebuilding new scripts with Yeoman, I found this training sample.

Digging deeper and reviewing some other peoples experiences it seems like adding commands to the commandbar in the Extension will work under very non-user friendly conditions which will not work as a product, you need to directly link to the page (some rumor you have to use classical list view), if you go off of that page to another page and return you have the same issues again.

The best way to test this is to:

build the 03-liverviewcommandset
configure serve.json to point to a single library page with 3 or more documents in it
use "gulp serve" to start the process
After loading you will need to do a ctrl-F5 to flush the buffer and wake up the system at times
You should be able to see the buttons in the commandbar based upon the demo logic
navagate away to the "Site contents" or something and then return and you will see that the buttons no longer appear on the commandbar
NOTE: No errors show in the console related to the failed addition to the commandbar or the extension failing, it is quiet failure as best I can tell.

(Related link from Webpart: #10077)

Failing example:
https://github.com/SharePoint/sp-dev-training-spfx-extensions/tree/master/Demos/03-listviewcommandset

I am hoping someone else can try this example to help confirm the problem. I don't mind bringing the bug somewhere else as I don't think this is a problem with this DEMO, but with the underlying framework, I just don't know where to bring it from here.

@tristian2
Copy link

i too am experiencing the issue for an Application Customizer. if i follow the simple example from Microsoft using the yeoman generator, oninit() is not triggered.

link to the "helloworld" example from Microsoft https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/build-a-hello-world-extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants