This is a migrated thread and some comments may be shown as answers.

Kendo file / is included more than once

13 Answers 421 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gregory
Top achievements
Rank 1
Gregory asked on 10 May 2017, 06:10 PM

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>

13 Answers, 1 is accepted

Sort by
0
Gregory
Top achievements
Rank 1
answered on 10 May 2017, 06:23 PM
Additionally, I notice this when I use SignalR to refresh a grid... How could refreshing a grid load multiple kendo references?
0
Gregory
Top achievements
Rank 1
answered on 10 May 2017, 06:23 PM
Additionally, I notice this when I use SignalR to refresh a grid... How could refreshing a grid load multiple kendo references?
0
Gregory
Top achievements
Rank 1
answered on 10 May 2017, 07:15 PM
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?
0
Gregory
Top achievements
Rank 1
answered on 10 May 2017, 08:07 PM

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?

0
Gregory
Top achievements
Rank 1
answered on 10 May 2017, 09:43 PM
I was able to fix the error by combining the js files into one using the Kendo UI Custom Download wizard. Thanks!
0
Steve
Top achievements
Rank 1
answered on 24 May 2017, 11:52 AM

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 ?

0
Stefan
Telerik team
answered on 26 May 2017, 08:25 AM
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 (charts) and form elements.
0
Lisha
Top achievements
Rank 1
answered on 20 Mar 2019, 12:37 AM

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>

0
Viktor Tachev
Telerik team
answered on 21 Mar 2019, 09:46 AM
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.
0
Mike
Top achievements
Rank 1
answered on 14 Apr 2019, 11:58 PM

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>

0
Viktor Tachev
Telerik team
answered on 17 Apr 2019, 04:35 AM
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.
0
Mike
Top achievements
Rank 1
answered on 17 Apr 2019, 01:45 PM

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).

0
Viktor Tachev
Telerik team
answered on 19 Apr 2019, 10:23 AM
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.
Tags
General Discussions
Asked by
Gregory
Top achievements
Rank 1
Answers by
Gregory
Top achievements
Rank 1
Steve
Top achievements
Rank 1
Stefan
Telerik team
Lisha
Top achievements
Rank 1
Viktor Tachev
Telerik team
Mike
Top achievements
Rank 1
Share this question
or