Results 1 to 3 of 3

Thread: 6.6.0 no exception if invalid JSON data is loaded by a JsonStore

    You found a bug! We've classified it as EXTJS-27610 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Nov 2013
    Location
    Piacenza, Italy
    Posts
    220

    Default 6.6.0 no exception if invalid JSON data is loaded by a JsonStore

    If a store loads invalid JSON, no error or exception is shown in console.

    This is made even worse by the fact that version 6.6.0 does not accept JavaScript objects as JSON any more (while in previous versions it was accepted): the result is that you upgrade an application to 6.6.0, it does not show any data, but you get no errors at all!

    Code:
            var store = new Ext.data.JsonStore({
                autoLoad: true,
                proxy: {
                    type: 'ajax',
                    url: 'data1.json', // WRONG JSON (not loaded, but no error)
                    reader: {
                        type: 'json'
                    }
                }
            });

    Example:

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Looks like they changed the getResponseData method of Ext.data.reader.Json in 6.6.0. They have a typeof check now to see if it's an object except a good JavaScript dev would know "typeof null === 'object'" is true which is what is tripping it up for your case.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha Staff
    Join Date
    Sep 2017
    Posts
    126

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Replies: 9
    Last Post: 18 Nov 2013, 4:22 AM
  2. Data.JsonStore exception do not fires
    By IlyasFacihov in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 18 Jan 2013, 2:02 PM
  3. jsonstore not loaded with data
    By spor in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 1 Nov 2010, 3:02 AM
  4. Replies: 6
    Last Post: 20 May 2009, 10:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •