-
Notifications
You must be signed in to change notification settings - Fork 1k
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
New command set extension doens't show up in the bar or console log #10145
Comments
Hello @JonEOffice, |
@JonEOffice, |
@Ashlesha-MSFT Not entirly since the ./config/serve.json section breaks stuff. But I have provide the steps I took to get to this point in the steps to reproduce. Did you try the steps? Here is the .ts file. All default
|
@JonEOffice , Additionally, please ensure that you select at least one row in the list before testing the command set. The command set view will only appear when a row is selected, according to your code logic. |
@Ashlesha-MSFT that is a copy paste problem, it was already in there ![]() And I know I have to select an item, as you can see in the code I have put in a console.log in there. This also doesn't trigger |
@Ashlesha-MSFT #10101 Might this be the same problem? |
I was getting the same error the other day. The command bar button would only show up on first page load, but disappear with subsequent page refreshes. What fixed it for me was to set Offline and sync to No: List Settings > Advanced Settings > "Allow people to sync this list to their computers with Microsoft Lists and access it in the browser without an internet connection?" = No. @JonEOffice , I'm having the same issue with report in #10101 where the SPFx Filed Customizer isn't calling the onInit(). Disabling syncing hasn't solved the issue for me with that one. |
@JonEOffice, |
As the the default it was set on the CommandBar. I have changed it to both the locations, but no difference
|
@Ashlesha-MSFT The warning that I receive
|
@JonEOffice, For the warning that you receive could you please follow below issue |
I tried that solution of disabling the offline mode, but it still doesn't work. Besides that I want to get the button to work on a document library, not a list. |
@JonEOffice, since i am not able to repro the issue, I have done some workaround
|
@Ashlesha-MSFT Thank you for your help so far. But I can't get this to work. |
@JonEOffice, |
@Ashlesha-MSFT Thank you! So with your version I don't get the ajv error, so I could run it with "ajv": "^6.12.5". Which is different from mine "ajv": "^8.17.1", But I still don't see the commands on the commandbar. Not with edge or chrome. Changed the registrationID to 101. Changed the offline mode to off. Still don't see the commands, still see the warning in the console. Might this be related to whatever is installed on my machine? |
@JonEOffice, It might be related to something specific in your local development environment. |
@Ashlesha-MSFT I found the cause of my problems, I was always doing gulp serve --nobrowser and copying the URL at the end of the string: in the tests I tried gulp serve and copy this below URL behind the library and that loads the actions in. I did try to gulp build, bundle and package it and that also didn't load the buttons, so I don't know if this fixes all my issues, but I now see the commands using the workbench |
@Ashlesha-MSFT So I now get the commands to show up on my workbench, but when I build the solution it still doens't show up. How to fix this? I tried on my other machine and there everything is different, no issue with deploying nor issue with the ajv. Works there. So it is this machine that is having issues. what can it be, I use nvm on both machines. Can it be something like pnp powershell that is installed? |
@Ashlesha-MSFT I still don't get it, I build your solution and I don't get the ajv error and I build mine and I get it with mine. The package.json are the same After building I see that my solution has more folders then yours in the node_modules folder. How is this build if is not based upon the package.json?
|
Its because of older package-lock.json |
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
Additional environment details
"@microsoft/sp-core-library": "1.20.0",
"@microsoft/sp-dialog": "1.20.0",
"@microsoft/sp-listview-extensibility": "1.20.0",
"@microsoft/eslint-plugin-spfx": "1.20.2",
"@microsoft/rush-stack-compiler-4.7": "0.1.0",
"@microsoft/sp-build-web": "1.20.2",
"@microsoft/sp-module-interfaces": "1.20.2",
"@rushstack/eslint-config": "4.0.1",
"@types/webpack-env": "~1.15.2",
"ajv": "^8.17.1",
"eslint": "8.57.0",
"gulp": "4.0.2",
"typescript": "4.7.4"
Describe the bug / error
I build a default command set view extension using yo @microsoft/sharepoint. after it is finished I run gulp serve -nobrowser.
Copy the URL to a doc lib and append ?debug=true&noredir=true&debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests%2Ejs
nothing
Copy the URL to a list and append ?debug=true&noredir=true&debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests%2Ejs
nothing
change RegistrationId to 101 under elements.xml. Close down gulp serve and rerun it. Do the same again on both locations nothing.

the only thing that pops up is this:
I have this in the code:
but this message does not appear in the console log
Is there something I'm missing here?
Steps to reproduce
Expected behavior
To see the command buttons
The text was updated successfully, but these errors were encountered: