We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35103
    • 54 Posts
    A client who I built a site for let their hosting lapse. They then paid the host company and the site was restored but now the site doesn't work properly; the "work" section doesn't populate with any of the resources and the manager does not show, instead I get:

    Fatal error: Call to a member function get() on a non-object in /home/***thesite***/public_html/core/model/modx/modmanagerresponse.class.php on line 41
    


    I have checked the databases using phpmyadmin and it looks like all the content is in there, and all the files are on the server, but clearly something is wrong.

    Has anyone experienced this or something similar and have a solution?

    Any advice greatly appreciated,

    David
      • 1841
      • 141 Posts
      Hi Jaeger83,

      Have you checked that the file / folder permissions and ownership are correct? Have you tried clearing the cache?

      Was the site moved to a different server or just "re-activated"?
        • 42046
        • 436 Posts
        Quote from: antsplace at Sep 10, 2013, 09:58 PM
        Was the site moved to a different server or just "re-activated"?

        That's what my first thought was. Try running a info.php page and make sure all the paths are correct in the MODX config file.

        <?php
        
        phpinfo();
        
        ?>
          • 35103
          • 54 Posts
          Thanks for the speedy responses guys,

          It was reactivated, I don't think it was moved to a new server.

          I will check permissions and run info.php

          Thanks,

          David
            • 35103
            • 54 Posts
            OK all the permissions of any file I check seem to be either 755 or 644, which is what I would expect.

            I have run the info.php file but to be honest I don't know much about php so couldn't say I'd spot an error. Could it be anything to do with the php version? It is set to PHP 5.3.22 . I think the modx version is 2.2.4-pl

            the config.core.php files in the root and manager folders contain this:

            <?php
            define('MODX_CORE_PATH', '/home/juliahta/public_html/core/');
            define('MODX_CONFIG_KEY', 'config');
            ?>
            


            the config.inc.php contains:

            <?php
            /**
             *  MODX Configuration file
             */
            $database_type = 'mysql';
            $database_server = 'localhost';
            $database_user = 'juliahta_julia';
            $database_password = 'xxxxxxxxxxxxxxxxx';
            $database_connection_charset = 'utf8';
            $dbase = 'juliahta_modx';
            $table_prefix = 'modx_';
            $database_dsn = 'mysql:host=localhost;dbname=juliahta_modx;charset=utf8';
            $config_options = array (
            );
            $driver_options = array (
            );
            
            $lastInstallTime = 1340873041;
            
            $site_id = 'modx4fec19511388f9.97427126';
            $site_sessionname = 'SN4fec18cf93881';
            $https_port = '443';
            $uuid = '18b23056-1522-4ac7-ab2e-c3b5a31f3981';
            
            if (!defined('MODX_CORE_PATH')) {
                $modx_core_path= '/home/juliahta/public_html/core/';
                define('MODX_CORE_PATH', $modx_core_path);
            }
            if (!defined('MODX_PROCESSORS_PATH')) {
                $modx_processors_path= '/home/juliahta/public_html/core/model/modx/processors/';
                define('MODX_PROCESSORS_PATH', $modx_processors_path);
            }
            if (!defined('MODX_CONNECTORS_PATH')) {
                $modx_connectors_path= '/home/juliahta/public_html/connectors/';
                $modx_connectors_url= '/connectors/';
                define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                define('MODX_CONNECTORS_URL', $modx_connectors_url);
            }
            if (!defined('MODX_MANAGER_PATH')) {
                $modx_manager_path= '/home/juliahta/public_html/manager/';
                $modx_manager_url= '/manager/';
                define('MODX_MANAGER_PATH', $modx_manager_path);
                define('MODX_MANAGER_URL', $modx_manager_url);
            }
            if (!defined('MODX_BASE_PATH')) {
                $modx_base_path= '/home/juliahta/public_html/';
                $modx_base_url= '/';
                define('MODX_BASE_PATH', $modx_base_path);
                define('MODX_BASE_URL', $modx_base_url);
            }
            if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                $isSecureRequest = false;
            } else {
                $isSecureRequest = ((isset ($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || $_SERVER['SERVER_PORT'] == $https_port);
            }
            if (!defined('MODX_URL_SCHEME')) {
                $url_scheme=  $isSecureRequest ? 'https://' : 'http://';
                define('MODX_URL_SCHEME', $url_scheme);
            }
            if (!defined('MODX_HTTP_HOST')) {
                if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
                    $http_host='juliahtaylor.com';
                    define('MODX_HTTP_HOST', $http_host);
                } else {
                    $http_host= $_SERVER['HTTP_HOST'];
                    if ($_SERVER['SERVER_PORT'] != 80) {
                        $http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
                    }
                    $http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
                    define('MODX_HTTP_HOST', $http_host);
                }
            }
            if (!defined('MODX_SITE_URL')) {
                $site_url= $url_scheme . $http_host . MODX_BASE_URL;
                define('MODX_SITE_URL', $site_url);
            }
            if (!defined('MODX_ASSETS_PATH')) {
                $modx_assets_path= '/home/juliahta/public_html/assets/';
                $modx_assets_url= '/assets/';
                define('MODX_ASSETS_PATH', $modx_assets_path);
                define('MODX_ASSETS_URL', $modx_assets_url);
            }
            if (!defined('MODX_LOG_LEVEL_FATAL')) {
                define('MODX_LOG_LEVEL_FATAL', 0);
                define('MODX_LOG_LEVEL_ERROR', 1);
                define('MODX_LOG_LEVEL_WARN', 2);
                define('MODX_LOG_LEVEL_INFO', 3);
                define('MODX_LOG_LEVEL_DEBUG', 4);
            }
            if (!defined('MODX_CACHE_DISABLED')) {
                $modx_cache_disabled= false;
                define('MODX_CACHE_DISABLED', $modx_cache_disabled);
            }
            
            


            I have been on the database and all the site content seems intact, should I try creating a new user to access and see if that helps?

            Would re-running the installer over the top ruin the original site and content?

            Thanks,

            David
              • 22840
              • 1,572 Posts
              What did the hosting company do ? IE was the site suspended or removed ?

              I would check the database user and password are correct first because if they restored it after deleting it the passwords wont be the same, they may have also changed the password for security if they were waiting for a payment.

              You also havent confirmed if you've deleted everything in the core / cache folder ?

              If none of the above work try running setup in upgrade mode.
                • 35103
                • 54 Posts
                Thanks Paulp and everyone else for their help, it was finally resolved, and as suggested it was a database user password mismatch since the restore. I simply deleted the old user and replaced it with a new one with the same name and the old password and the site seems to be working fine, including the manager.

                Hugely appreciate all the help!

                Thanks,

                David