Results 1 to 3 of 3

Thread: Getting a 404 error in modern but not in classic.

  1. #1
    Sencha User
    Join Date
    Oct 2017
    Posts
    6

    Default Answered: Getting a 404 error in modern but not in classic.

    Hello all, I am very new to ExtJS and I was asked to port an admin settings view in the classic toolkit into the modern toolkit.

    I am currently using:

    Ubuntu 14.04
    ExtJS 6.0.2
    SenchaCmd 6.5.1.240
    Google Chrome 46

    Given that parity has not been achieved between both toolkits, I made the decision to change the relevant xtypes that were not supported by the modern toolkit to those that were in Terms.js. As expected, this was not enough as I am getting two errors:

    1. Error: [Ext.create] Invalid class name or alias 'null' specified, must be a non-empty string

    2. Uncaught TypeError: Cannot read property 'getStore' of undefined

    On the view, I am getting a 404 error.

    Looking upon the stack trace, I found that it was happening in the Controller.js onTermsLoaded() function. But this is only happening with the modern toolkit and not the classic toolkit. Here is the function:

    onTermsLoaded: function() {
    var combo = this.getReferences().termSelector, // For some reason this is returning null in modern but not in classic
    rec = combo.getStore().findRecord('active', true);
    combo.setValue(rec.get('id'));
    },



    I have not changed the model or controllers in either toolkits, only the Terms.js file.

    If there is any other information anyone needs, please let me know. I have been going on this for weeks and trying to see what is going on. I appreciate any help!

    I tried posting the code on here but for some reason it is not allowing me to. I can message you the code if you like.

    Thank you.

  2. 1. I would guess this is a class/xtype which isn't in the Modern API, can't you see the line which is causing the error in the browser developer tools/console? The 404 properly relates to the application trying to load the unknown class from the backend, this will give you a clue if you look in the network tab in the dev tools.

    2. The combo that you are referencing does it have the reference set in the config:

    PHP Code:
    reference'termSelector' 

  3. #2
    Sencha Premium Member
    Join Date
    Jun 2015
    Location
    Melbourne, Australia
    Posts
    56
    Answers
    6

    Default

    1. I would guess this is a class/xtype which isn't in the Modern API, can't you see the line which is causing the error in the browser developer tools/console? The 404 properly relates to the application trying to load the unknown class from the backend, this will give you a clue if you look in the network tab in the dev tools.

    2. The combo that you are referencing does it have the reference set in the config:

    PHP Code:
    reference'termSelector' 

  4. #3
    Sencha User
    Join Date
    Oct 2017
    Posts
    6

    Default

    Quote Originally Posted by bslater View Post
    1. I would guess this is a class/xtype which isn't in the Modern API, can't you see the line which is causing the error in the browser developer tools/console? The 404 properly relates to the application trying to load the unknown class from the backend, this will give you a clue if you look in the network tab in the dev tools.

    2. The combo that you are referencing does it have the reference set in the config:

    PHP Code:
    reference'termSelector' 
    I decided to start coding the modern view and controllers from scratch so i could learn ExtJS as well as not deal with the bug. Now that you mention it that was probably the cause but this is something I will have in mind if a similar error arises. Thank you for your time!

Similar Threads

  1. [OPEN] classic vs modern vs core
    By The0s in forum Sencha Documentation
    Replies: 1
    Last Post: 30 Jan 2017, 1:34 PM
  2. Different folder name for classic/modern
    By demongloom in forum Ext JS 6.x Q&A
    Replies: 6
    Last Post: 29 May 2016, 11:26 PM
  3. Split Ext 6: Q&A into modern and classic?
    By bslater in forum Ext JS 6.x Q&A
    Replies: 4
    Last Post: 30 Mar 2016, 7:09 AM
  4. Classic & Modern Merge
    By enagic in forum Ext JS 6.x Q&A
    Replies: 1
    Last Post: 26 Jun 2015, 12:43 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
  •