Kendo file / is included more than once

8 posts, 0 answers
  1. Gregory
    Gregory avatar
    27 posts
    Member since:
    Feb 2014

    Posted 10 May Link to this post

    Anyone know why I'm getting a javascript error saying: "Kendo file / is included more than once"? Sometimes it doesn't show this error, but most of the time it does. Below is my layout.cshtml. Any help would be greatly appreciated!

     

     

     

    <!DOCTYPE html>


    <html>
    <head>
        <title>@ViewBag.Title</title>
        <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
        <link href="@Url.Content("~/Content/kendo/2017.1.223/kendo.common.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.223/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.223/kendo.default.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/kendo/2017.1.223/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/kendo/2017.1.223/jquery.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.1.223/jszip.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.1.223/kendo.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.1.223/kendo.aspnetmvc.min.js")"></script>
    @RenderSection("HeadContent", false)

        @*using the bundles instead*@
        @*@Styles.Render("~/Content/test.css")*@
        @Scripts.Render("~/bundles/bootstrap")
        @Styles.Render("~/Content/css")
    <script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
    </head>
    <body>
        <header>
        </header>
        <div id="body">
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>

        <footer>
            <div class="content-wrapper">
            </div>
        </footer>
    </body>
    </html>
    <!--Reference the SignalR library. (after jquery references)-->
    <script src="~/Scripts/jquery.signalR-2.2.0.min.js"></script>
    <!--Reference the autogenerated SignalR hub script. -->
    <script src="~/signalr/hubs"></script>

  2. Gregory
    Gregory avatar
    27 posts
    Member since:
    Feb 2014

    Posted 10 May Link to this post

    Additionally, I notice this when I use SignalR to refresh a grid... How could refreshing a grid load multiple kendo references?
  3. Gregory
    Gregory avatar
    27 posts
    Member since:
    Feb 2014

    Posted 10 May Link to this post

    Additionally, I notice this when I use SignalR to refresh a grid... How could refreshing a grid load multiple kendo references?
  4. Gregory
    Gregory avatar
    27 posts
    Member since:
    Feb 2014

    Posted 10 May Link to this post

    After further testing, it's not just SignalR refreshes. The error gets thrown randomly, or at least I can't reproduce it reliably... Do my script references look ok?
  5. Gregory
    Gregory avatar
    27 posts
    Member since:
    Feb 2014

    Posted 10 May Link to this post

    It seems like having the following scripts it causes this:

    /Scripts/kendo/2017.1.223/kendo.all.min.js

    /Scripts/kendo/2017.1.223/kendo.aspnetmvc.min.js

    When I remove the reference to: "kendo.aspnetmvc.min.js" it doesn't throw this error. However, I need that reference because I am using mvc. Any ideas?

  6. Gregory
    Gregory avatar
    27 posts
    Member since:
    Feb 2014

    Posted 10 May Link to this post

    I was able to fix the error by combining the js files into one using the Kendo UI Custom Download wizard. Thanks!
  7. Steve
    Steve avatar
    3 posts
    Member since:
    Sep 2016

    Posted 24 May Link to this post

    Hi,

    I'm seeing the same error as Gregory was getting but am loading the .js files from the Telerik CDN so his solution isn't going to work for me.

    Anyone got a suggestion ?

  8. Stefan
    Admin
    Stefan avatar
    1028 posts

    Posted 26 May Link to this post

    Hello Steve,

    This is not a known issue and combining both script files should not be required.

    This is how a regular scripts and style files references should look like when using the CDN:



    Please check if there is another place where Kendo UI scripts are loaded.

    If the issue still occurs, please send a runnable example reproducing the issue and I gladly assist.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top