Kendo file / is included more than once

10 posts, 0 answers
  1. Gregory
    Gregory avatar
    29 posts
    Member since:
    Feb 2014

    Posted 10 May 2017 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
    29 posts
    Member since:
    Feb 2014

    Posted 10 May 2017 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
    29 posts
    Member since:
    Feb 2014

    Posted 10 May 2017 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
    29 posts
    Member since:
    Feb 2014

    Posted 10 May 2017 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
    29 posts
    Member since:
    Feb 2014

    Posted 10 May 2017 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
    29 posts
    Member since:
    Feb 2014

    Posted 10 May 2017 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 2017 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
    2208 posts

    Posted 26 May 2017 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.
  9. Lisha
    Lisha avatar
    4 posts
    Member since:
    Feb 2019

    Posted 3 days and 7 hours ago in reply to Stefan Link to this post

    i do have the kendo references properly defined. but i still i get this error

     

    kendo.syncReady(function(){jQuery("#BudgetNegotiationGrid").kendoGrid({"dataBound":dataBound,"edit":edit,"columns":[{"title":"Proposal","headerAttributes":{"data-field":"ProposalID","data-title":"Proposal"},"width":"5px","field":"ProposalID","filterable":{"operators":{"string":{"startswith":"Starts with"}}},"encoded":true}],"pageable":{"refresh":true,"buttonCount":10},"sortable":true,"selectable":"Single, Row","filterable":{"extra":false,"operators":{"string":{"startswith":"Starts with"}}},"resizable":true,"scrollable":false,"messages":{"noRecords":"No records available."},"dataSource":{"type":(function(){if(kendo.data.transports['aspnetmvc-ajax']){return 'aspnetmvc-ajax';} else{throw new Error('The kendo.aspnetmvc.min.js script is not included.');}})(),"transport":{"read":{"url":"/BudgetNegotiation/BudgetNegotiation/Budget_Negotiation_Read"},"prefix":""},"pageSize":30,"page":1,"total":0,"serverPaging":true,"serverSorting":true,"serverFiltering":true,"serverGrouping":true,"serverAggregates":true,"filter":[],"schema":{"data":"Data","total":"Total","errors":"Errors","model":{"fields":{"ProposalID":{"type":"number"},"SiteID":{"type":"string"},"SiteName":{"type":"string"},"Address":{"type":"string"},"Grade":{"type":"string"},"SchoolDistrict":{"type":"number"},"RFP":{"type":"string"},"tblSitesID":{"type":"number"},"RFPType":{"type":"string"},"RFPYear":{"type":"string"},"FinalAward":{"type":"string"}}}}},"mobile":true});});
    </script>

     

       <link href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.common-bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
        <link href="https://kendo.cdn.telerik.com/2019.1.220/styles/kendo.bootstrap.min.css" rel="stylesheet" type="text/css" />
        <script src="https://kendo.cdn.telerik.com/2019.1.220/js/jquery.min.js"></script>
        <script src="https://kendo.cdn.telerik.com/2019.1.220/js/jszip.min.js"></script>
        <script src="https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js"></script>
        <script src="https://kendo.cdn.telerik.com/2019.1.220/js/kendo.aspnetmvc.min.js"></script>

  10. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2213 posts

    Posted 1 day and 22 hours ago Link to this post

    Hi Lisha,

    Such script errors can be observed when a script is missing or jQuery is referenced multiple times. Would you make sure that there is only one reference in the project and see how the behavior changes?

    In case the errors persist please send us a runnable sample where the behavior is replicated. This will enable us to examine it and look for what is causing the issue.


    Regards,
    Viktor Tachev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top