-
Notifications
You must be signed in to change notification settings - Fork 835
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
react-application-messagebanner - Will not display after adding to site #1194
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Hi @LouFarho, After using M365 to upgrade the code to the latest SPFX of 1.18.2 and fixed a couple of lint errors, I was able to debug using Gulp Serve. Then after I packaged and built the package. Hopefully my latest PR will be accepted. I used the PNP PowerShell code to add to my global catalog, then used the other pnp powershell code to add to my site. I took exact script that is in the README.md file. The SharePoint site, required me to do a Ctrl+F5 first time for it to instantly appear for me.
From what you have said above, I'm wondering if the page needed a Ctrl+F5. If you have deployed the package in the App Catalog and then run locally, you would see 2 copies on the page. Or what might have happened is that the ClientSideComponentProperties you have deployed (if changed from the default in the readme.md file) has an error in it, and failing to appear on the page, but when you run gulp serve locally, both components on the page picked up the working values from debug settings. Try looking what values you have by running the following code. #Connect to your site first....
$(Get-pnpCustomAction -Scope Site | Where-Object {$_.ClientSideComponentId -eq "1e2688c4-99d8-4897-8871-a9c151ccfc87"}).ClientSideComponentProperties | ConvertFrom-Json I would think if anything has been read incorrectly, the above line would fail, as it cannot convert it from Json to an object. Let me know how you get on, and I'll continue to help where I can, but as far as I can see, there is nothing wrong with the example. |
@pmatthews05 It appears the problem was I uploaded the package into the app catalog as opposed to using the script. So, this begs the question why uploading into the app catalog doesn't work for this solution? |
Sample
react-application-messagebanner
Author(s)
@pmatthews05, @bschlintz
What happened?
After adding the package to my app catalog, I use the provided PowerShell to add it to a site. Nothing happens on the site.
If I run Gulp Serve, then the deployed extension will display along with the one from Gulp Serve.
Steps to reproduce
Expected behavior
With the provided PowerShell, the message banner should display on the site as documented in the solution.
Target SharePoint environment
SharePoint Online
Developer environment
Windows
Browsers
Node.js version
v18.19.0
Additional environment details
SPFx 1.18.2
Yeoman 5.0.0
The text was updated successfully, but these errors were encountered: