We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2611
    • 394 Posts
    All my code worked fine, but I couldn't open the manager. Thought I'd leave this up here if anybody wants to test.

    This is the error:
    "PHP Fatal error: Uncaught Error: Call to a member function setProperties() on null in core/model/modx/modmanagerresponse.class.php"

    Open the file: core/model/modx/modmanagerresponse.class.php

    Depending on your version, find this line (in my file it's line #190):
    $this->modx->controller = call_user_func_array(array($c,$getInstanceMethod),array($this->modx,$className,$this->action));


    And change it to:
    $this->modx->controller = call_user_func_array(array($c,$getInstanceMethod),array(&$this->modx,$className,$this->action));


    The only difference is passing $this->modx as a reference by using ampersand &$this->modx. Got my whole manager up and running again!
    Here's the complete function:
        public function instantiateController($className,$getInstanceMethod = 'getInstance') {
            try {
                $c = new $className($this->modx,$this->action);
                if (!($c instanceof modExtraManagerController) && $getInstanceMethod == 'getInstanceDeprecated') {
                    $getInstanceMethod = 'getInstance';
                }
                /* this line allows controller derivatives to decide what instance they want to return (say, for derivative class_key types) */
                $this->modx->controller = call_user_func_array(array($c,$getInstanceMethod),array(&$this->modx,$className,$this->action));
    
                $this->modx->controller->setProperties($c instanceof SecurityLoginManagerController ? $_POST : array_merge($_GET,$_POST));
                $this->modx->controller->initialize();
            } catch (Exception $e) {
                die($e->getMessage());
            }
            return $this->modx->controller;
        }


    Good luck to y'all.
      Follow me on twitter: @b03tz
      Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
      CodeMaster
      • 7455
      • 2,204 Posts
      Nice work!! thank you so much!!

      PHP 7 is so much faster!! Great that I can now use my beloved cms on php7!
        follow me on twitter: @dimmy01
        • 2611
        • 394 Posts
        :P
          Follow me on twitter: @b03tz
          Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
          CodeMaster
          • 3749
          • 24,544 Posts
          Nice catch! Could you report that here.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 2611
            • 394 Posts
            Took quite some time digging through the non-related error messages to find this smiley

            Issues created:
            https://github.com/modxcms/revolution/issues/12788
              Follow me on twitter: @b03tz
              Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
              CodeMaster
              • 3749
              • 24,544 Posts
              Thanks! smiley
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 49079
                • 12 Posts
                Waaa!!! Thank you very much!!! I'm too was looking solution!!! It's work!
                  • 49079
                  • 12 Posts
                  I get 10x increase performance in real project.

                  PHP5.6 (ms, try1, try2, try3) before update
                  page1 - 1000, 800, 800
                  page2 - 1500, 1100, 1190
                  page3 - 1400, 900, 862
                  page4 - 1600, 700, 700

                  PHP7.02 (ms, try1, try2, try3) after update
                  page1 - 125, 96, 89
                  page2 - 165, 104, 111
                  page3 - 187, 105, 102
                  page4 - 145, 97, 114

                  I restarted cgi process before trying for each page.

                  All tests without modx cache.
                    • 42035
                    • 90 Posts
                    Its Working..Great..
                      Arkalp.com
                      • 39827
                      • 42 Posts
                      Your solution is awsome! Very happy with you B03tz!

                      I was forced to install a 2-4-2-pl version because of a movement to new server running PHP 7.
                      After install a direct crash into the manager (white screen)
                      Same error in the logfile: "PHP Fatal error: Uncaught Error: Call to a member function setProperties() on null in core/model/modx/modmanagerresponse.class.php".

                      I noticed the fix was added to the next versions :"Mark-H added this to the v2.4.3-pl milestone on 4 Dec 2015"