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

0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'replace': object is null or undefined

1 Answer 213 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 10 Jun 2014, 07:14 PM
i was following the tutorial from
http://demos.telerik.com/aspnet-mvc/listview/editing

and i keep on getting this error,
Unhandled exception at line 9, column 6976 in http://localhost:50879/Scripts/kendo/2014.1.528/kendo.all.min.js

0x800a138f - Microsoft JScript runtime error: Unable to get value of the property 'replace': object is null or undefined

most of thread with similar question are asked to check for the duplicate jquery files so i checked mine and seems ok.

 can any one help pls.

my code as below
===============BundleConfig.cs====================

        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/modernizr-2.6.2.js",
                "~/Scripts/jquery-1.10.2.min.js",
                "~/Scripts/bootstrap.min.js"
                )
                );

            bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                "~/Scripts/kendo/2014.1.528/kendo.all.min.js",
                //"~/Scripts/kendo/2014.1.528/kendo.timezones.min.js",
                "~/Scripts/kendo/2014.1.528/kendo.aspnetmvc.min.js"));

            bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
            "~/Content/kendo/2014.1.528/kendo.common-bootstrap.min.css",
            "~/Content/kendo/2014.1.528/kendo.bootstrap.min.css"));

            bundles.IgnoreList.Clear();
        }
===============================_Layout.cshtml===================

@using System.Web.Optimization
@*@using Telerik.Web.Mvc.UI*@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @*<link href="~/Content/Site.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" type="text/css" />*@
    @*@Html.Telerik().StyleSheetRegistrar().DefaultGroup(group =>group.Add("telerik.common.css").Add("telerik.vista.css"))*@
   
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/kendo")
     @Styles.Render("~/Content/kendo/css")
    
</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Application name", "Index", "Home", null, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                </ul>
            </div>
        </div>
    </div>

    <div class="container body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
        </footer>
    </div>
   
    
    @*@Html.Telerik().ScriptRegistrar() *@
</body>
</html>





1 Answer, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 11 Jun 2014, 10:46 AM
Hello Anam,

In your bundling definition I noticed the following (see highlighted parts):

            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/modernizr-2.6.2.js",
                "~/Scripts/jquery-1.10.2.min.js",
                "~/Scripts/bootstrap.min.js"
                )

It seems that you are including two jQuery registrations in one of the script bundles, which most likely causes the error. Try to correct it to see whether this helps.

Regards,
Sebastian
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or