Results 1 to 7 of 7

Thread: mock data 404 not found

    You found a bug! We've classified it as FIDDLE-329 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Dec 2014
    Posts
    26
    Answers
    2

    Default Answered: mock data 404 not found

    Hi

    I am confused that I created a JSON file in mock data and I tried to load the data to a store.
    After I execute the code, the chrome developer tool tell me the file is 404 ( Not Found).
    How do I load the JSON file correctly?
    Thank you!
    PHP Code:
    var comboStore Ext.create('Ext.data.Store', {    
      
    fields: ['dimension''format'],    
      
    autoLoadtrue,    
      
    proxy: {        
        
    type'ajax',        
        
    url'format',        
        
    actionMethods: {            
          
    create'POST',            
          
    read'POST',            
          
    update'POST',            
          
    destroy'POST'        
        
    },        
        
    reader: {           
          
    type'json',            
          
    root'formats'        
        
    }    
      }    
    });

    var 
    combo Ext.create('Ext.form.ComboBox', { 
      
    fieldLabel'Choose Format',    
      
    storecomboStore,    
      
    queryMode'local',    
      
    displayField'format',    
      
    valueField'local',    
      
    renderToExt.getBody()
    }); 
    Fiddle

  2. Looks like the mock data overrides aren't hooking into 4.0.7 as if I select 4.2.1 it works.

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

    Default

    Looks like the mock data overrides aren't hooking into 4.0.7 as if I select 4.2.1 it works.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

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

  4. #3
    Sencha Premium User
    Join Date
    Oct 2015
    Location
    Arvada, CO
    Posts
    76
    Answers
    3

    Default

    I'm actually seeing this same error no matter the framework I use.

  5. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    Quote Originally Posted by WO_Jef View Post
    I'm actually seeing this same error no matter the framework I use.
    It's working just fine for me. Here's a very simple fiddle I used:



    I tested this on all these different versions:

    Ext JS 6.0.1.250
    Ext JS 6.0.0.640
    Ext JS 5.1.2.748
    Ext JS 5.1.1.451
    Ext JS 5.1.0.107
    Ext JS 5.0.1.1255
    Ext JS 5.0.0.970
    Ext JS 4.2.4.1720
    Ext JS 4.2.3.1255
    Ext JS 4.2.2.1144
    Ext JS 4.2.1.883
    Ext JS 4.2.0.663

    Got tired of testing but then decided I need to test some Sencha Touch versions so used these:

    Sencha Touch 2.4.2
    Sencha Touch 2.4.1
    Sencha Touch 2.4.0

    And got tired of all these successes real quick.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

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

  6. #5
    Sencha Premium User
    Join Date
    Oct 2015
    Location
    Arvada, CO
    Posts
    76
    Answers
    3

    Default

    That's so weird... take a look at this one. store3 gets a 404. I had another example, but now I can't find it. Yours works just fine for me.

  7. #6
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,450
    Answers
    3997

    Default

    That's because you're creating and loading a store before Ext JS says it's ready which you should never do even in an application. Also, you are setting the store instances onto the class definition (not the class instance) which is also a no no.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

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

  8. #7
    Sencha Premium User
    Join Date
    Oct 2015
    Location
    Arvada, CO
    Posts
    76
    Answers
    3

    Default

    Bitten by a rookie mistake again... I had started to move all my definitions outside of the Application, so I could use them as the viewport. Forgot I was actually creating stores there, then just got caught up in it. Duh. Thanks.

Similar Threads

  1. fiddle's mock data scripting
    By yeghikyan in forum Sencha Fiddle
    Replies: 1
    Last Post: 23 Mar 2015, 2:27 AM
  2. Mock data for a from.load()
    By EPV in forum Sencha Fiddle
    Replies: 4
    Last Post: 9 Jan 2015, 12:04 AM
  3. Adding Mock data with Ext JS 3.4 crashes javascript
    By comecme in forum Sencha Fiddle
    Replies: 1
    Last Post: 14 Mar 2014, 5:40 AM
  4. [FIXED] Mock Data Tabs are Not Saved
    By existdissolve in forum Sencha Fiddle
    Replies: 6
    Last Post: 26 Jul 2013, 6:11 PM
  5. [OPEN] Fiddle Idea: Canned Mock Data
    By existdissolve in forum Sencha Fiddle
    Replies: 3
    Last Post: 25 Jul 2013, 1:25 PM

Tags for this Thread

Posting Permissions

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