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

15 posts, 0 answers
  1. Kenny
    Kenny avatar
    2 posts
    Member since:
    Aug 2010

    Posted 15 Aug 2012 Link to this post

    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.



  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 17 Aug 2012 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Sig
    Sig avatar
    8 posts
    Member since:
    Mar 2011

    Posted 09 Sep 2012 Link to this post

    Hey Nikolay, just as a heads up -- I'm able to get this error as well in IE 10.
  5. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 10 Sep 2012 Link to this post

    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!
  6. Aaron
    Aaron avatar
    1 posts
    Member since:
    Sep 2012

    Posted 23 Sep 2012 Link to this post

    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.
  7. Terry Apodaca
    Terry Apodaca avatar
    1 posts
    Member since:
    Apr 2010

    Posted 13 Jun 2013 Link to this post

    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?
  8. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 19 Jun 2013 Link to this post

    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!
  9. George
    George avatar
    1 posts
    Member since:
    Jun 2013

    Posted 04 Jul 2013 Link to this post

    also have the issue. only IE. I am using tab control, dropdownlist, treeview, and grid.

    the error is thrown from kendo.all.min.js
  10. Adeel
    Adeel avatar
    4 posts
    Member since:
    Sep 2012

    Posted 20 Aug 2013 Link to this post

    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.
  11. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 23 Aug 2013 Link to this post

    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!
  12. Randal
    Randal avatar
    3 posts
    Member since:
    Sep 2013

    Posted 13 Sep 2013 Link to this post

    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.
  13. Randal
    Randal avatar
    3 posts
    Member since:
    Sep 2013

    Posted 13 Sep 2013 Link to this post

    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 :-)
  14. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 16 Sep 2013 Link to this post

    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!
  15. Scott
    Scott avatar
    6 posts
    Member since:
    May 2015

    Posted 18 Dec 2015 Link to this post

    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)

  16. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 23 Dec 2015 Link to this post

    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
Back to Top
UI for ASP.NET MVC is VS 2017 Ready