'uid' is undefined

8 posts, 0 answers
  1. Zeke Palmolive
    Zeke Palmolive avatar
    19 posts
    Member since:
    Jul 2012

    Posted 16 Jul 2012 Link to this post

    Has anyone ever experienced the following error:

    'uid' is undefined
    kendo.all.min.js, line 8 character 217810


    I get this when browsing the site with IE8 and the latest FireFox.  Everything works fine when using Chrome.

    I'm using jquery.iecors for IE8 support and have set the Access-Control-Allow-Origin header to * on the Web API site that serves up the JSON data.  The Web API JSON call is successful and is returning valid JSON data for all browsers.

    I'm not too sure where to go from here, any suggestions are welcome.
  2. Zeke Palmolive
    Zeke Palmolive avatar
    19 posts
    Member since:
    Jul 2012

    Posted 19 Jul 2012 Link to this post

    Still can't figure this one out.

    Has anyone else had issues like this between browsers?
  3. Kendo UI is VS 2017 Ready
  4. Zeke Palmolive
    Zeke Palmolive avatar
    19 posts
    Member since:
    Jul 2012

    Posted 20 Jul 2012 Link to this post

    I've narrowed down the issue.

    Using EF5, MVC4 and Web API using the vanilla JSONFormatter.  JSON coming from the web api works under Chrome, but not FireFox or IE.

    When I browse to the Web API URL through a web browser, copy and paste the JSON data into a javascript variable and assign that variable to the data property of a grid, it then works in FireFox/IE.

    Any ideas?
  5. Chris Williams
    Chris Williams avatar
    63 posts
    Member since:
    Oct 2004

    Posted 22 Aug 2012 Link to this post

    I have the exact same issue, and I've repro'd it exactly.  I get the same error in IE 10.0; Chrome processes it successfully.



    The only difference in my case is that I'm not using WebAPI; I'm using a standard controller approach as shown in the examples sample code for the MVC wrapper.



    I'm also using MVC4. .Net 4 and EF5. 
  6. Chris
    Chris avatar
    2 posts
    Member since:
    Jul 2012

    Posted 08 Nov 2012 Link to this post

    I have the same issue. In Firefox the error is "ReferenceError: uid is not defined" but it works fine in Chrome. Doesn't work in IE9 either.

    Using MVC 4 web api, EF, etc.

    Any updates?
  7. Zeke Palmolive
    Zeke Palmolive avatar
    19 posts
    Member since:
    Jul 2012

    Posted 08 Nov 2012 Link to this post

    In your datasource, set the dataType to JSON:

    dataType: 'JSON'
  8. Chris
    Chris avatar
    2 posts
    Member since:
    Jul 2012

    Posted 19 Nov 2012 Link to this post

    ive tried:

    dataType: "JSON"

    dataType: "json"

    type: "JSON"

    type: "json"

    No avail. If I copy the JSON data the comes out of the web service and then set it to a local datasource it works.

    Were you able to get yours working?
  9. Zachary
    Zachary avatar
    23 posts
    Member since:
    Feb 2013

    Posted 06 Nov 2013 Link to this post

    What a doozy. In my case, I had a field called "data" in my datasource. Using Web API outputting JSON.
Back to Top
Kendo UI is VS 2017 Ready