We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29839 ☆ A M B ☆
    • 66 Posts
    Hello Dear fellow modx revolution users:

    I am having trouble with my modx install, i can not get passed this error:
    Fatal error: Class ’modAccessibleSimpleObject’ not found in /core/model/modx/modresource.class.php on line 7

    What can i do about this?
      • 29839 ☆ A M B ☆
      • 66 Posts
      I’m running the latest version of Revolution, just try the update procedure but it stucks at the same error.
        • 29839 ☆ A M B ☆
        • 66 Posts
        These are the first 100 lines of the file: modresource.class.php


        <?php
        /**
         * Represents a web resource managed by the modX framework.
         *
         * @package modx
         */
        class modResource extends modAccessibleSimpleObject {
            /**
             * Represents the cacheable content for a resource.
             *
             * Note that this is not the raw source content, but the content that is the
             * result of processing cacheable tags within the raw source content.
             * @var string
             */
            public $_content= '';
            /**
             * Represents the output the resource produces.
             * @var string
             */
            public $_output= '';
            /**
             * The context the resource is requested from.
             *
             * Note that this is different than the context_key field that describes a
             * primary context for the resource.
             * @var string
             */
            public $_contextKey= null;
            /**
             * Indicates if the resource has already been processed.
             * @var boolean
             */
            protected $_processed= false;
            /**
             * The cache filename for the resource in the context.
             * @var string
             */
            public $_cacheKey= null;
            /**
             * Indicates if the site cache should be refreshed when saving changes.
             * @var boolean
             */
            protected $_refreshCache= true;
            public $_jscripts = array();
            public $_sjscripts = array();
            public $_loadedjscripts = array();
        
            function __construct(& $xpdo) {
                parent :: __construct($xpdo);
                $this->_contextKey= isset ($this->xpdo->context) ? $this->xpdo->context->get('key') : 'web';
                $this->_cacheKey= "[contextKey]/resources/[id]";
            }
        
            /**
             * Process a resource, transforming source content to output.
             *
             * @return string The processed cacheable content of a resource.
             */
            public function process() {
                if (!$this->get('cacheable') || !$this->_processed || !$this->_content) {
                    $this->_content= '';
                    $this->_output= '';
                    $this->xpdo->getParser();
                    if ($baseElement= $this->getOne('Template')) {
                        if ($baseElement->process()) {
                            $this->_content= $baseElement->_output;
                            $this->_processed= true;
                        }
                    } else {
                        $this->_content= $this->getContent();
                        $maxIterations= intval($this->xpdo->getOption('parser_max_iterations',10));
                        $this->xpdo->parser->processElementTags('', $this->_content, false, false, '[[', ']]', array(), $maxIterations);
                        $this->_processed= true;
                    }
                }
                $this->mergeKeywords();
                $this->mergeMetatags();
                return $this->_content;
            }
        
            /**
             * Gets the raw, unprocessed source content for a resource.
             *
             * @param array $options An array of options implementations can use to
             * accept language, revision identifiers, or other information to alter the
             * behavior of the method.
             * @return string The raw source content for the resource.
             */
            public function getContent(array $options = array()) {
                $content = '';
                if (isset($options['content'])) {
                    $content = $options['content'];
                } else {
                    $content = $this->get('content');
                }
                return $content;
            }
        
            /**
             * Set the raw source content for this element.
          • 22303 MODX Staff
          • 10,725 Posts
          I think a file upload must have failed; did you FTP the files to your server? If so, try again.
            • 29839 ☆ A M B ☆
            • 66 Posts
            Yes i did, i went true the update guide. copied all files over to server except config etc... went true the setup but it then stalled when i clicked on install... i then get the error message above.
              • 29839 ☆ A M B ☆
              • 66 Posts
              I also tried just overwriting the file that is indicating the error without change...
                • 22303 MODX Staff
                • 10,725 Posts
                If you want to get further assistance, you’ll have to provide the detailed environment information we request in red at the bottom the textarea where you post your messages here in these forums.
                  • 29839 ☆ A M B ☆
                  • 66 Posts
                  Modx version: MODX REVOLUTION VERSION 2.0.5-PL / traditional
                  Architecture x86_64
                  MySQL version 5.1.47-community-log
                  cPanel Build 46156
                  Apache version 2.2.16
                  Kernel version 2.6.32-26.1.BHsmp
                  cPanel Version 11.25.0-RELEASE
                  PHP version 5.2.14
                  cPanel Pro 1.0 (RC1)

                  if pdo_mysql is installed, i guess not (no idea what that is)

                  Browser is Chrome: 8.0.552.224

                  This is the last error mentioned in the error log file (file is 2mb):
                  [2010-12-20 07:36:22] (ERROR @ /connectors/lang.js.php) Could not load class: modAccessibleSimpleObject from mysql.modaccessible



                  If you need anything else please let me know.
                    • 22303 MODX Staff
                    • 10,725 Posts
                    I would start the installation from scratch. I’ve never seen this issue before and it doesn’t make any logical sense. I think something got corrupted in file transfer...
                      • 29839 ☆ A M B ☆
                      • 66 Posts
                      I went true the update process again on top of an already installed MODX REVOLUTION VERSION 2.0.5-PL, to overwrite any corrupted files but the installation did stop at this same error.
                      At the installation summary everything is marked OK. Then when i click on "install", i get the same error.

                      Anyways, just checked my server status and there have been some corrupted sql files on my server. They run a recovery or whatever and the install went flawlessy. I can log back in.

                      It seemed to be caused by a corrupted sql file...

                      Thanks for you help. I might just change my host-provider... he is causing me a lot of trouble. Dont want to do any namecalling but is starts with Blue....

                      Kind regards,