We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4579
    • 10 Posts
    Yesterday I had a bit of trouble with my manager and I’m not sure if it’s a local problem or a bug which needs raising.

    The short version is http://svn.modxcms.com/crucible/changelog/modx/branches/revolution?cs=4764 seems to break my manager. Or more accurately the renaming in modx.layout.js is the problem.

    The result is that the accordion menus are displayed in a different order, without headers, and fully expanded. Annoying and ugly but not a showstopper. The real problem is the Save button then does nothing at all.

    I’ve rebuilt with various revisions and basically the only time the problem exists is with r4764 of modx.layout.js - I’m currently looking at an install with r4784 for everything else and a pre r4764 of modx.layout.js

    I just feel that’s a big enough bug that someone else would’ve noticed so I’m wondering if it’s a local issue somehow. I’ve tried in multiple browsers, cleared caches, forced reloads, etc. but no joy. As soon as that file is updated it breaks.

    Server environment: FreeBSD/Apache2.2, core isn’t running in the webroot but I’ve no (apparent) problems from that, it seems to run quite smoothly in fact.
      • 28215
      • 4,149 Posts
      Have you tried reloading the lexicon? (Go to Tools -> Lexicon Management -> click on the button that says ’Reload Core Entries from Base’. Then force-refresh on your browser (hold shift and click refresh).

      If that doesn’t work - well, I’ll need more information: any browser errors, what browser are you using, and errors in core/cache/logs/error.log, etc.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 4579
        • 10 Posts
        Well with r4764 installed the Lexicon Manager won’t even load actually. I got there using the old copy before reloading from base and it ran without errors but the problem persists.

        There are no errors in the core/cache/logs/error.log

        When I try in Firefox 3 FireBug gives the following on page load:

        A.header is undefined
        setContainer()(Object initialConfig=Object contentEl=modx_rt_div)ext-all.js (line 72)
        onLayout()(Object initialConfig=Object xtype=panel, Object dom=div#ext-gen177.x-panel-body id=ext-gen177)ext-all.js (line 65)
        onLayout()(Object initialConfig=Object xtype=panel, Object dom=div#ext-gen177.x-panel-body id=ext-gen177)ext-all.js (line 65)
        setActiveItem()(Object initialConfig=Object xtype=panel, Object dom=div#ext-gen177.x-panel-body id=ext-gen177)ext-all.js (line 66)
        onLayout()()ext-all.js (line 65)
        ContainerLayout()(undefined)ext-all.js (line 64)
        ContainerLayout()()ext-all.js (line 64)
        Action()("modx-accordion-content")ext-all.js (line 58)
        Action()(Object xtype=panel applyTo=modx-accordion-content)ext-all.js (line 58)
        getViewWidth()()ext-base.js (line 9)
        getViewWidth()()ext-base.js (line 9)
        getViewWidth()()ext-base.js (line 9)
        Component()(Object xtype=panel applyTo=modx-accordion-content, undefined)ext-all.js (line 57)
        load()()modx.js (line 31)
        loadTrees()()modx.layout.js (line 78)
        Layout()(Object xtype=modx-layout accordionPanels=[0])modx.layout.js (line 14)
        Component()(Object xtype=modx-layout accordionPanels=[0], undefined)ext-all.js (line 57)
        load()()modx.js (line 31)
        (?)()()index.php?a=1 (line 62)
        EventManager()()ext-all.js (line 12)
        [Break on this error] Ext.layout.Accordion=Ext.extend(Ext.layo...YOUTS["accordion"]=Ext.layout.Accordion;


        When I click save the following is added:
        this.el is undefined
        initComponent()(undefined)ext-all.js (line 135)
        beforeSubmit()(Object form=Object config=Object)modx.pan...source.js (line 270)
        EventManager()()ext-all.js (line 12)
        EventManager()()ext-all.js (line 12)
        submit()(undefined)modx.panel.js (line 74)
        handleClick()(Object initialConfig=Object process=update, Object browserEvent=Event blur button=-1 type=blur)modx.act...uttons.js (line 239)
        initComponent()(Object browserEvent=Event blur button=-1 type=blur)ext-all.js (line 87)
        h()()eventfix.js (line 192)
        getViewWidth()()ext-base.js (line 10)
        [Break on this error] Ext.form.BasicForm=function(B,A){Ext.app...his}});Ext.BasicForm=Ext.form.BasicForm;


        Opera’s DragonFly goes a little further. On load:
        Timeout thread: delay 1 ms
        Error:
        name: TypeError
        message: Statement on line 72: Cannot convert undefined or null to Object
        Backtrace:
          Line 72 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(A){if(this.animate===false){A.animCollapse=false}A.collapsible=true;if(this.autoWidth){A.autoWidth=true}if(this.titleCollapse){A.titleCollapse=true}if(this.hideCollapseTool){A.hideCollapseTool=true}if(this.collapseFirst!==undefined){A.collapseFirst=this.collapseFirst}if(!this.activeItem&&!A.collapsed){this.activeItem=A}else{if(this.activeItem){A.collapsed=true}}Ext.layout.Accordion.superclass.renderItem.apply(this,arguments);A.header.addClass("x-accordion-hd");A.on("beforeexpand",this.beforeExpand,this)}
          Line 65 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(D,E){var B=D.items.items;for(var C=0,A=B.length;C<A;C++){var F=B[C];if(F&&(!F.rendered||!this.isValidParent(F,E))){this.renderItem(F,C,E)}}}
          Line 65 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(A,B){this.renderAll(A,B)}
          ...  Line 66 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(A,B){Ext.layout.FitLayout.superclass.onLayout.call(this,A,B);if(!this.container.collapsed){this.setItemSize(this.activeItem||A.items.itemAt(0),B.getStyleSize())}}
          Line 65 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(){var A=this.container.getLayoutTarget();this.onLayout(this.container,A);this.container.fireEvent("afterlayout",this.container,this)}
          Line 64 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(D){if(this.rendered&&this.layout){this.layout.layout()}if(D!==false&&this.items){var C=this.items.items;for(var B=0,A=C.length;B<A;B++){var E=C[B];if(E.doLayout){E.doLayout()}}}}
          Line 64 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(){Ext.Container.superclass.render.apply(this,arguments);if(this.layout){if(typeof this.layout=="string"){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var A=this.activeItem;delete this.activeItem;this.layout.setActiveItem(A);return }}if(!this.ownerCt){this.doLayout()}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}}
          Line 58 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(A){this.allowDomMove=false;this.el=Ext.get(A);this.render(this.el.dom.parentNode)}
          Line 58 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(B){B=B||{};if(B.initialConfig){if(B.isAction){this.baseAction=B}B=B.initialConfig}else{if(B.tagName||B.dom||typeof B=="string"){B={applyTo:B,id:B.id||B}}}this.initialConfig=B;Ext.apply(this,B);this.addEvents("disable","enable","beforeshow","show","beforehide","hide","beforerender","render","beforedestroy","destroy","beforestaterestore","staterestore","beforestatesave","statesave");this.getId();Ext.ComponentMgr.register(this);Ext.Component.superclass.constructor.call(this);if(this.baseAction){this.baseAction.addComponent(this)}this.initComponent();if(this.plugins){if(Ext.isArray(this.plugins)){for(var C=0,A=this.plugins.length;C<A;C++){this.plugins[C]=this.initPlugin(this.plugins[C])}}else{this.plugins=this.initPlugin(this.plugins)}}if(this.stateful!==false){this.initState(B)}if(this.applyTo){this.applyToMarkup(this.applyTo);delete this.applyTo}else{if(this.renderTo){this.render(this.renderTo);delete this.renderTo}}}
          ...  Line 9 of linked script http://revolution.modx/manager/assets/ext2/adapter/ext/ext-base.js
            function(){sp.apply(this,arguments)}
          ...  Line 9 of linked script http://revolution.modx/manager/assets/ext2/adapter/ext/ext-base.js
            function(){sp.apply(this,arguments)}
          ...  Line 9 of linked script http://revolution.modx/manager/assets/ext2/adapter/ext/ext-base.js
            function(){sp.apply(this,arguments)}
          Line 57 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(C,D){return new A[C.xtype||D](C)}
          Line 31 of linked script http://revolution.modx/manager/assets/modext/core/modx.js
                        os.push(Ext.ComponentMgr.create(a[i]));
          Line 49 of linked script http://revolution.modx/manager/assets/modext/core/modx.layout.js
                    MODx.load({
          Line 14 of linked script http://revolution.modx/manager/assets/modext/core/modx.layout.js
                this.loadTrees();


        On Save:
        Event thread: click
        Error:
        name: TypeError
        message: Statement on line 135: Cannot convert undefined or null to Object
        Backtrace:
          Line 135 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(B){var A=Ext.lib.Ajax.serializeForm(this.el.dom);if(B===true){return A}return Ext.urlDecode(A)}
          Line 270 of linked script http://revolution.modx/manager/assets/modext/widgets/resource/modx.panel.resource.js
                    var vs = Ext.getCmp('modx-resource-settings-fp').getForm().getValues();
          ...  Line 12 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(){var F=this.listeners,I,D=F.length;if(D>0){this.firing=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H<D;H++){var E=F[H];if(E.fireFn.apply(E.scope||this.obj||window,arguments)===false){this.firing=false;return false}}this.firing=false}return true}
          ...  Line 12 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(){if(this.eventsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A=="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}}return true}
          Line 71 of linked script http://revolution.modx/manager/assets/modext/widgets/core/modx.panel.js
                    	if (this.fireEvent('beforeSubmit',{
          Line 239 of linked script http://revolution.modx/manager/assets/modext/core/modx.actionbuttons.js
            					o.form.submit();
          ...  Line 87 of linked script http://revolution.modx/manager/assets/ext2/ext-all.js
            function(A){if(A){A.preventDefault()}if(A.button!=0){return }if(!this.disabled){if(this.enableToggle&&(this.allowDepress!==false||!this.pressed)){this.toggle()}if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("click",this,A);if(this.handler){this.handler.call(this.scope||this,this,A)}}}
          ...  Line 192 of linked script http://revolution.modx/manager/assets/modext/util/eventfix.js
                        fn.call(scope || el, e, t, o);
          Line 10 of linked script http://revolution.modx/manager/assets/ext2/adapter/ext/ext-base.js
            function(R){return typeof Ext!="undefined"?P(Ext.lib.Event.getEvent(R)):false}
          ...
          • 28215
          • 4,149 Posts
          A few things:

          1. Don’t use Firebug when running MODx - it slows it dramatically.
          2. It sounds like you’ve corrupted your copy somehow - try completely erasing the manager/ directory, then running svn update and a new build/upgrade.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 4579
            • 10 Posts
            1) It’s not a problem, I only enable it for debugging things and I can cope with a slow site while doing that.
            2) Tried it 3 times yesterday, today that fixed it. Looks like my staging script may have been the problem - I tweaked it for better performance this morning and I guess the old prep section wasn’t doing as good a job as I thought.