Placeholders not found on Site Pages while using SPFx Application Customizer
Category
- [ ] Question
- [ ] Typo
- [x] Bug
- [ ] Additional article idea
Expected or Desired Behavior
I am creating a global top level menu using Application Customizer, which will be tied to Top Placeholder of the page.
Observed Behavior
Application Customizer is unable to render Top Placeholder on any of the Site Pages. It works fine on all _layouts pages and all lists/document library items pages. It fails on Site Pages, even on the plain out of box site page. This holds true for both Communication and Team site template.

Steps to Reproduce
TS file : https://gist.github.com/ashishshukla1183/da28d1aafd38e5929d9ac8c7538f044b
Package.json enteries: "dependencies": { "@microsoft/sp-core-library": "~1.4.1", "@microsoft/decorators": "~1.4.1", "@types/webpack-env": "1.13.1", "@types/es6-promise": "0.0.33", "@microsoft/sp-dialog": "~1.4.1", "@microsoft/sp-application-base": "~1.4.1", "@microsoft/sp-webpart-base": "~1.4.1", "@microsoft/sp-listview-extensibility": "~1.4.1", "@microsoft/sp-http": "~1.4.1", "@microsoft/microsoft-graph-client": "1.2.0" }, "devDependencies": { "@microsoft/sp-build-web": "~1.4.1", "@microsoft/sp-module-interfaces": "~1.4.1", "@microsoft/sp-webpart-workbench": "~1.4.1", "gulp": "~3.9.1", "@types/chai": "3.4.34", "@types/mocha": "2.2.38", "ajv": "~5.2.2" }
I have seen similar reported issues which were told to be fixed. However, I am still facing this issue. Any suggestions or help will be appreciated.
I have an application customizer that have been running without any issues for months. Today it stopped working with the same issue. Needs to be fixed asap as this is running in multiple environments. @VesaJuvonen
Error message:

Code snippet:
let placeholder: PlaceholderContent;
placeholder = this.context.placeholderProvider.tryCreateContent(PlaceholderName.Top);
ReactDom.render(element, placeholder.domElement);
I have an application customizer that have been running without any issues for months. Today it stopped working with the same issue. Needs to be fixed asap as this is running in multiple environments. @VesaJuvonen
Error message:
Code snippet:
let placeholder: PlaceholderContent; placeholder = this.context.placeholderProvider.tryCreateContent(PlaceholderName.Top); ReactDom.render(element, placeholder.domElement);
Same with me. It was running all fine until yesterday. I noticed that it disappears, only on pages with search box in header. Not sure if there is any relation with it, but i came to know that there was some major search outage/fixes going on in last few days. May be the old search issue with application customizer has cropped up again.
Seems related to layout changes on site pages due to missing dom element for top placeholder. I've tried to reach out to Vesa on Twitter to get som quicker response on the issue.
Same here, extensions for header and footer stopped working suddenly... Fortunately, it only happens when the tenant is set to first realease. EDIT : i was wrong, we also have the problem on standard release in production !!!
Same for me !
Also confirming the same behavior.
Might be a duplicate of https://github.com/SharePoint/sp-dev-docs/issues/2773. patmil described a fix that might help you: https://github.com/SharePoint/sp-dev-docs/issues/2773#issuecomment-430424273
Same for us. Fix did't have an effect...
We have two extensions : one working with the top placeholder, one with the bottom placeholder. With the fix by @patmill in place, the extension with top placeholder works well but the one with the bottom placeholder disapears when we navigate from one site to another... (both extensions work roughlythe same way and we did not notice any problem before today...)
Looking into this. In the meantime, any further information would be helpful: Is this happening only for first-release tenants? Is it the header, footer, or both, that are not appearing? Does it happen on all site templates? Is it only happening on modern pages (and not happening on modern lists) Does it only happen on pages that show search in the suite nav?
Thanks for any help.
For me, it's happening ...
- ... on 4 first-release tenants - unfortunately I currently don't have quick access to a non-first-release tenant.
- ... on communication sites and team sites
- ... on site pages (application pages are fine, list views fine as well)
@frnk01 - You should try and follow a pattern in code to look more like this (this isn't the reason you aren't seeing the placeholder, but I noticed it in your code) :
let placeholder: PlaceholderContent; placeholder = this.context.placeholderProvider.tryCreateContent(PlaceholderName.Top); if ( placeholder ) { ReactDom.render(element, placeholder.domElement); }
You want to ensure that the placeholder exists before accessing the domElement of it.
@BigEaseGueldi - Do you happen to notice if the search box is in the suite nav (very top navigation bar)? Does the placement of the search box differ from the list page to the site page?
Looking into this. In the meantime, any further information would be helpful: Is this happening only for first-release tenants? Does it happen on all site templates? Is it only happening on modern pages (and not happening on modern lists) etc.
Thanks for any help. For me its happening for:
- All first release tenants
- Communication and team site.
- Site Pages only
OK, one more question for people that are helping out here (thank you for your help). If you look at the sources tab in the developer tools, you should see some files coming from a URL like: spoprod-a.akamaihd.net\files\sp-client-prod_2018-*********\sp-pages-assembly_en-us....
What is the full version # in the 2018-********* showing?
Thanks again for helping.
OK, one more question for people that are helping out here (thank you for your help). If you look at the sources tab in the developer tools, you should see some files coming from a URL like: spoprod-a.akamaihd.net\files\sp-client-prod_2018-*********\sp-pages-assembly_en-us....
What is the full version # in the 2018-********* showing?
Thanks again for helping. Not sure if this is what you were asking. Sharing some screenshots.

Thanks @ashishshukla1183 - that helps. The version # is 2018-09-28.13
@BigEaseGueldi - Do you happen to notice if the search box is in the suite nav (very top navigation bar)? Does the placement of the search box differ from the list page to the site page?
The search box is where it used to be (not in the suite nav): for list views/ application pages, the search box is in the command bar (on the right), for site pages, it's in the composite header.
OK, this is frustrating. I have a tenant w/ the same build ID, but am not having the same issue. We have rolled back the build for now while we continue to investigate.
If anyone happens to feel OK sharing their source code (or at least their onInit function, where the code hooks up to the PlaceholdersChanged event, and the code where they tryCreateContent) that would help as well.
OK, this is frustrating. I have a tenant w/ the same build ID, but am not having the same issue. We have rolled back the build for now while we continue to investigate.
If anyone happens to feel OK sharing their source code (or at least their onInit function and the code where they tryCreateContent) that would help as well.
You can refer mine at https://gist.github.com/ashishshukla1183/da28d1aafd38e5929d9ac8c7538f044b Let me know if you need any more details.
