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

IE9 - Unable to get value of the property 'replace': object is null or undefined

14 Answers 684 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kenny
Top achievements
Rank 1
Kenny asked on 15 Aug 2012, 10:50 PM
URL :
http://www.rewardsalad.com/Pages/Events/EventList.aspx

Error message :
SCRIPT5007: Unable to get value of the property 'replace': object is null or undefined
kendo.all.min.js, line 8 character 4630


Please see the attachment for the error screenshot.

It's occurred only in IE 9. in all other web browsers, FF, Chrome, Safari and even IE8, it's not happening.
Not everytime. but, at least, more than 50%.

Please help me out.

Thanks.



14 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 17 Aug 2012, 07:24 AM
Hello Kenny,

This is really odd behavior. If you add a break point before KendoDataBind function is called inside document ready handler you will notice that the template selector will not find the element, i.e $("#rowTemplate") doesn't find the element.

If you inspect the document at that point (while debugging) you will see that part of the markup is not yet loaded for some reason only in IE9.

I've tried to replicate similar scenario by copy-paste of the original response from server and wasn't able to receive the error.

In order to proceed further I suggest you stripping down the page and see whether the error disappears. If not it will be best to send us runnable app which replicates the error so we can debug it locally.

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sig
Top achievements
Rank 1
answered on 10 Sep 2012, 03:27 AM
Hey Nikolay, just as a heads up -- I'm able to get this error as well in IE 10.
0
Nikolay Rusev
Telerik team
answered on 10 Sep 2012, 08:38 AM
Hello Sig,

Can you provide us with runnable sample to replicate the error for IE9/10?

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Aaron
Top achievements
Rank 1
answered on 23 Sep 2012, 11:44 PM
I just got this same error in IE9 but not in Chrome.

It seems the extent of the impact of this issue may be limited to a failure to play nice with VS debugger because running in non-debug mode, it goes away.
0
Terry Apodaca
Top achievements
Rank 2
answered on 14 Jun 2013, 02:26 AM
This happens in other browsers too...I run this my app in "Start Without Debugging" and I can reproduce this in any browser.  Run in regular mode and it only happens in IE9.  Was there ever a fix for this?
0
Nikolay Rusev
Telerik team
answered on 19 Jun 2013, 06:11 AM
We are still not sure how to replicate the described behavior. Can someone provide us with a sample and exact steps required to replicate it?
 

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
George
Top achievements
Rank 1
answered on 04 Jul 2013, 11:43 AM
also have the issue. only IE. I am using tab control, dropdownlist, treeview, and grid.

the error is thrown from kendo.all.min.js
0
Adeel
Top achievements
Rank 1
answered on 20 Aug 2013, 04:09 PM
I am also getting this error in IE.
I am using kendoui grid on some pages of my application. This issue occurs on a random basis and I have failed to figure out what's the exact cause to this curse of IE.
0
Nikolay Rusev
Telerik team
answered on 23 Aug 2013, 06:26 AM
Hello Charles,

Unfortunately we cannot do much without being able to replicate the behavior. We will be more than happy to have it fixed once we see it happen.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Randal
Top achievements
Rank 1
answered on 13 Sep 2013, 07:46 PM
I don't think that this is a browser dependent problem and other browsers may just suppress the error.  I have attached a zip file that contains the necessary information to reproduce the issue.  The instructions and code are all in the readme but I have also included the project files as well.  I have been using the other kendo controls rather succesfully but this one has me stumped.  

Currently in my real project I am binding the listView after my grid completes binding but I have also tried using BindTo and get the same results.  I'm sure that it is something silly that I have missed, but I hope the attached helps.  Thanks.
0
Randal
Top achievements
Rank 1
answered on 13 Sep 2013, 09:01 PM
I think that I found the issue.  I had no script 'template' which I overlooked.

    <script type="text/x-kendo-tmpl" id="template">
        <div>#:Description#</div>
    </script>

The one thing that I don't understand now is that everything that I read stated that I should be able to use:

.ClientTemplateId("<div>#:Description#</div>")

This will throw an error as JQuery will try to add another # and will give a formating error which will look something like #<div>#:Description#</div>.

At least the original problem was in the chair that I am currently sitting :-)
0
Nikolay Rusev
Telerik team
answered on 16 Sep 2013, 08:30 AM
Hello Randal,

Indeed your findings are correct. As the name of the property infer *ClientTemplateId* (sample usage - 5th point here) expects the *id* of the client template, not the client template itself.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Scott
Top achievements
Rank 1
answered on 18 Dec 2015, 09:51 PM

I am getting this error.

"Error: Unable to get property 'replace' of undefined or null reference"

I only get it if my grid comes up initially with no records. If there are records it works fine.
It is using the popup add/edit feature.  This just started happening.  I have debugged as far as I can and do not see anything that I can find.
This is the line in the minimized kendo.all file that keeps erroring.  I do have several Foreign Key dropdowns in the grid.

e("<select "+s.attr("text-field")+'="text"'+s.attr("value-field")+'="value"'+s.attr("source")+"='"+s.stringify(o(n.values)).replace(/\'/g,"&apos;")+"'"+s.attr("role")+'="dropdownlist"/>').attr(i).appendTo(t)

0
Nikolay Rusev
Telerik team
answered on 23 Dec 2015, 01:36 PM

Hello Scott,

 

I'm afraid that without having a isolated runnable example of the behavior will not be able to do much. 

 

As a wild guess (might not be relevant to your case) is to check whether all foreign key fields have default value defined in the schema.model. This assumption is based on the statement that - ` I do have several Foreign Key dropdowns in the grid.` and the fact that the error occurs while initializing DropDownList widget.

 

Regards,
Nikolay Rusev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Kenny
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Sig
Top achievements
Rank 1
Aaron
Top achievements
Rank 1
Terry Apodaca
Top achievements
Rank 2
George
Top achievements
Rank 1
Adeel
Top achievements
Rank 1
Randal
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Share this question
or