ShellCore breaks Boostrap table js

Mari Jørgensen
Member since: 2003
 

Hi,

I want to use Boostrap table in an Episerver plugin (separate view).

If I add the following sample to a plain .aspx file (outside EPiserver) everything works as expected.


    
     


If I add the same code to an Episerver plugin I get the following console error:

Uncaught TypeError: Cannot read property 'split' of undefined
    at init.data (ShellCore.js:1)
    at HTMLTableElement. (bootstrap-table.min.js:8)
    at Function.each (ShellCore.js:1)
    at init.each (ShellCore.js:1)
    at init.a.fn.bootstrapTable (bootstrap-table.min.js:8)
    at HTMLDocument. (CustomUserAdminTool:137)
    at Function. (ShellCore.js:2)
    at Function.each (ShellCore.js:1)
    at Function.ready (ShellCore.js:2)
    at HTMLDocument. (ShellCore.js:1)

The edit plugin loads the following Episerver components in head:

 
    @Html.Raw(ClientResources.RenderResources("ShellCore"))
    @Html.Raw(ClientResources.RenderResources("ShellWidgets"))

    
    @Html.Raw(ClientResources.RenderResources("ShellCoreLightTheme"))

    @Html.Raw(ClientResources.RenderResources("Style"))
    
    @Html.Raw(ClientResources.RenderResources("Navigation"))

    
    @Html.Raw(ClientResources.RenderResources("DojoDashboardCompatibility", new[] { ClientResourceType.Style }))

    @Html.Raw(ClientResources.RenderResources("epi.shell.ui", new[] { ClientResourceType.Style }))
    @Html.Raw(ClientResources.RenderResources("epi-cms.widgets.base", new[] { ClientResourceType.Style }))

Any advice on how to get past this issue?

#188337 Edited, Feb 20, 2018 11:27