Kendo file / is included more than once

14 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
    2256 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
    7 posts
    Member since:
    Feb 2019

    Posted 19 Mar 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
    2259 posts

    Posted 21 Mar 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.
  11. Mike
    Mike avatar
    4 posts
    Member since:
    Apr 2015

    Posted 14 Apr in reply to Viktor Tachev Link to this post

    I'm having the exact same issue, the fix for me is a custom bundle.  If i remove the kendo.aspnetmvc.min.js the error goes away but then a get the kendo.syncready is not a function error which is due to missing aspnetmvc file.

     

    <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
        <script src="https://kendo.cdn.telerik.com/2019.1.220/js/kendo.all.min.js?t=04132019"></script>
        <script src="https://kendo.cdn.telerik.com/2019.1.220/js/kendo.aspnetmvc.min.js?t=04132019"></script>

  12. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2259 posts

    Posted 16 Apr Link to this post

    Hi Mike,

    Please make sure that Kendo files are not referenced somewhere else in the application. If that is the case remove the extra references and leave only one.

    If the behavior persists, would you send us a runnable project where the error is observed so we can examine it?


    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.
  13. Mike
    Mike avatar
    4 posts
    Member since:
    Apr 2015

    Posted 17 Apr in reply to Viktor Tachev Link to this post

    Viktor -

    Would including the kendo.mvc.dll cause this issue to occur?  I've searched high and low and can't find any additional references outside of the 2 i posted (kendo.all and the kendo aspmvc js file).

  14. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2259 posts

    Posted 19 Apr Link to this post

    Hi Mike,

    If there is no reference to Kendo.Mvc.dll you would not be able to use the Kendo HtmlHelpers and there should be an error shown in Visual Studio.

    In case you are working on a MVC application and would like to use the MVC wrappers make sure that Kendo.Mvc.dll is referenced in the project.

    If the error persists please send us a runnable project where the issue can be replicated so we can examine it.


    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