Results 1 to 5 of 5

Thread: Extjs5 TypeError: Ext.data.Request is not a constructor

  1. #1

    Default Extjs5 TypeError: Ext.data.Request is not a constructor

    Hello everyone:
    I'm using Extjs5.
    When I require my customer store file,my firefox will make a error :
    Ext.data.Request is not a constructor

    My part of app.js is :
    Ext.application({
    name: 'MyApp',
    extend: 'MyApp.Application',
    requires: [
    'MyApp.*'
    ],
    autoCreateViewport: 'MyApp.view.main.Main'
    });



    Ext.define('MyApp.store.main.Left', {
    extend: 'Ext.data.TreeStore',
    model: 'MyApp.model.main.Left',
    autoLoad: true,
    proxy: {
    type: 'ajax',
    url: '/extjs5_mvvm/html/left.php',
    reader: {
    type: 'json'
    }
    }
    });


    Could some one help me? Thank you very much!

  2. #2
    Sencha User
    Join Date
    Dec 2012
    Posts
    29

    Default

    I'm having the same issue, have you (or anyone) found any solution yet?

  3. #3
    Sencha Premium Member bpjohnson's Avatar
    Join Date
    Jun 2007
    Location
    Atlanta, GA
    Posts
    50

    Default

    I was running into the same error. It looks like it could be a bug in Ext.data.proxy.Server. I fixed it by changing the following lines in Ext.data.proxy.Server.buildRequest (about line 223) from:

    PHP Code:
    request = new Ext.data.Request({
                
    params   params,
                
    action   operation.getAction(),
                
    records  operation.getRecords(),
                
    operationoperation,

                
    // this is needed by JsonSimlet in order to properly construct responses for
                // requests from this proxy
                
    proxyme
    }); 
    to:

    PHP Code:
    request Ext.create('Ext.data.Request',{
                
    params   params,
                
    action   operation.getAction(),
                
    records  operation.getRecords(),
                
    operationoperation,

                
    // this is needed by JsonSimlet in order to properly construct responses for
                // requests from this proxy
                
    proxyme
            
    }); 
    My guess is that the proxy was getting created or the store was autoloading before the entire app (including Ext.data.Request) had loaded.

  4. #4
    Sencha Premium User SebTardif's Avatar
    Join Date
    Feb 2011
    Location
    Cambridge, MA
    Posts
    1,294
    Answers
    16

    Default

    I can reproduce the same and same workaround works, so I have open a thread under bug -> http://www.sencha.com/forum/showthre...36#post1061836

  5. #5
    Sencha User
    Join Date
    Jan 2014
    Posts
    1

    Default

    Quote Originally Posted by bpjohnson View Post
    I was running into the same error. It looks like it could be a bug in Ext.data.proxy.Server. I fixed it by changing the following lines in Ext.data.proxy.Server.buildRequest (about line 223) from:

    PHP Code:
    request = new Ext.data.Request({
                
    params   params,
                
    action   operation.getAction(),
                
    records  operation.getRecords(),
                
    operationoperation,

                
    // this is needed by JsonSimlet in order to properly construct responses for
                // requests from this proxy
                
    proxyme
    }); 
    to:

    PHP Code:
    request Ext.create('Ext.data.Request',{
                
    params   params,
                
    action   operation.getAction(),
                
    records  operation.getRecords(),
                
    operationoperation,

                
    // this is needed by JsonSimlet in order to properly construct responses for
                // requests from this proxy
                
    proxyme
            
    }); 
    My guess is that the proxy was getting created or the store was autoloading before the entire app (including Ext.data.Request) had loaded.



    This solution worked for me !!!!!

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
  •