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.

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:

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:

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!