In one of our environments, we are getting a null reference exception from:
@Html.Kentico().PageBuilderScripts()
Looking at a snippet of the stack trace:
... System.Web.Optimization.AssetManager.RenderExplicit(String tagFormat, String[] paths) +34 Kentico.PageBuilder.Web.Mvc.PageBuilderAssetsProvider.GetPageComponentsAdminScriptBundleTag() +154 Kentico.PageBuilder.Web.Mvc.HtmlHelperExtensions.PageBuilderScriptsInternal(ExtensionPoint`1 instance, IAllowedDomainsRetriever retriever, IComponentLocalizationService localizationService) +762 ...
Has anyone encountered this?
What does the JavaScript look like?
System.Web.Optimization was last updated in 2014 and can't support a lot of modern JavaScript language features.
System.Web.Optimization
I've seen errors like this when trying to load scripts written with ES2015+ and ES Modules.
Please, sign in to be able to submit a new answer.