We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8274 ☆ A M B ☆
    • 222 Posts
    Looking into Discuss, and I am getting an error in the js when attempting to create a user group

    in usergroups.panel.js

    this code is returning a "Cannot read property 'createUserGroup' of undefined" error (referring to the this.windows.createUserGroup)

    anyone run into this yet?

        ,createUserGroup: function(btn,e,n) {
            var r = {};
            if (n !== false) {
                var id = this.cm.activeNode.id.substr(2).split('_');id = id[1];
                r['parent'] = id;
            } else {r['parent'] = 0;}
            
            if (!this.windows.createUserGroup) {
                this.windows.createUserGroup = MODx.load({
                    xtype: 'dis-window-usergroup-create'
                    ,record: r
                    ,listeners: {
                        'success':{fn:function() {this.refreshNode(this.cm.activeNode.id);},scope:this}
                    }
                });
            }
            this.windows.createUserGroup.setValues(r);
            this.windows.createUserGroup.show(e.target);
        }
    [ed. note: dvstudiosinc last edited this post 11 years, 5 months ago.]