We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46235
    • 15 Posts
    Hello,

    I've recently moved a Modx 2.5.7 Revo build from my test server to the live server but I'm now getting the following error message:

    Fatal error: Call to a member function getMessage() on a non-object in *insertServerPath*/core/model/modx/modmanagercontroller.class.php on line 616

    /**
         * Get the default state for the UI
         * @return array|mixed|string
         */
        public function getDefaultState() {
            /** @var modProcessorResponse $response */
            $response = $this->modx->runProcessor('system/registry/register/read',array(
                'register' => 'state',
                'topic' => '/ys/user-'.$this->modx->user->get('id').'/',
                'include_keys' => true,
                'poll_interval' => 1,
                'poll_limit' => 1,
                'remove_read' => false,
                'show_filename' => false,
                'time_limit' => 10,
            ));
            $obj = $response->getMessage();
            if (!empty($obj)) {
                $obj = $this->modx->fromJSON($obj);
            } else {
                $obj = array();
            }
            return $obj;
        }


    I've updated it to 2.5.8 just in case it was that but I get the same error after the upgrade. The front end of the site does work to an extent but imagery won't load, I'm not sure if it's a permission issue but I don't want to set everything to 777 as that's not practical.

    So the current version is 2.5.8 Revo.

    Thanks

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      It's more likely a path issue.

      First, try deleting all files in the core/cache directory.

      Second, try running setup if you haven't already. If you've deleted it, you'll have to upload the setup directory. Make sure it's from the same MODX version.

      If that doesn't work, check the paths in the core/config/config.inc.php file, especially the connectors path.

      Check the core path in the three config.core.php files (in the root, connectors, and manager directories).

      If none of that works, check the Rewrite Base line in .htaccess. If the site is not in a subdirectory, it should usually be just a slash /.

      A permission issue is unlikely since the code in the manager controller file is executing (assuming that all directories have the same permission).

      FWIW, setting permissions to 777 rarely works. Most servers now want 755 for directories and 644 for files. They will balk at any .php file in a 777 directory.
        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
        • 46235
        • 15 Posts
        Hi Bob,

        Thanks for the response.

        It was the paths in the core/config/config.inc.php file, I'm not sure how I missed a public_html but I did.

        Thanks