A new dev tenant will support SpFx webparts & extensions by default after creation per guidance at https://github.com/SharePoint/sp-dev-docs/blob/master/docs/spfx/enterprise-guidance.md
SpFx extensions cannot be debugged out-of-box. Code embedded in the OnRender() method is never called. Code embedded in OnInit() method is called as expected.
Settings -> Custom Script
Office 365
Local
To follow-up on this, I have created half a dozen tenants via
The only one which calls the OnRender() function is the tenant created via https://demos.microsoft.com/, even after setting the Allow script settings in the admin center in the others. This might be related to provisioning issues suggested in #808
Even after changing the proposed settings in the SharePoint admin page, the OnRender() function is not called in my example page. Interestingly 10 days before, OnRender() was called for site pages (but not for list pages) with original "Custom Script" settings. The OnInit() method is always called, so I don't think this is related to provisioning issues.
I've got the same issue - and it's not fixed by allowing custom scripts tenant wide .
On some modern UI pages i get an error in the console stating:
Error: definePlaceholders() was called with an unsupported name: PageHeader
After the error is produced - OnInit() gets called.
I know that the previous well-known HTML element was called "PageHeader" and was later changed to "Top".
Not sure if it related, but i think its worth mentioning.
I finally got a developer tenant via promo email from Office Dev Program o365dev@microsoft.com
I can confirm that OnRender() does not work for a new developer tenant, new communication site, with the @ microsoft/generator-sharepoint 1.1.3 hello world extension
The SPFx Extensions RC0 has just landed and this is one of the breaking changes.
https://dev.office.com/blogs/sharepoint-framework-extensions-rc0-now-available
https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-RC-Drop-1.2
Closing this as it is a known issue and the API is no longer supported. Please use RC0 which was released today.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Most helpful comment
The SPFx Extensions RC0 has just landed and this is one of the breaking changes.
https://dev.office.com/blogs/sharepoint-framework-extensions-rc0-now-available
https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes---Extensions-RC-Drop-1.2