Custom Create view is not correctly coped to cache

I have a bit of an odd issue here, and I'm not sure if it's me, or something wrong in the code.

I'm using 7.6 and having successfully extended the RecordView, I'm attempting to do the same in create.

All seems to go well for a while. I create custom/modules/Accounts/clients/base/views/create-actions/create-actions.js with some code to extend it (i.e. extendsFrom:'CreateActionsView') , and repair and rebuild.

Upon clearing the cache folder, the rebuild shows a new area, but causes a syntax error due to the unexpected } below:

"customCreate": {"controller": 
  // CustomCreate View (base) 
 },

What is going on here? My CustomRecord View shows all of the code I wrote in it just above this area. I had to manipulate the cache file to even get back in to repair.

Has anyone else experienced this?

Parents Reply Children
  • Hi Francesca,

    Thanks very much, I should have tried to start small and work up from there. Having put a console message in the method you wrote, I no longer get any errors when re-building.

    However, I now just get a blank white drawer when doing the quick create at the top right.

    Here's the code in custom/modules/Accounts/clients/base/views/create-actions/create-actions.js

    ({
    
    
        extendsFrom: 'AccountsCreateActionsView',
        initialize: function (options) {
            this._super('initialize', [options]);
            this.doSomething();
        },
    
    
        doSomething: function(){
            console.log("This is now in use");
        },
        _dispose: function() {
            this._super('_dispose');
        },
    
    
    })