Resource types

 
 
Tim at Lone Pine Koala Sanctuary
Re: Unable to create a Page
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Don't use 2.4.2. See https://moodle.org/mod/forum/discuss.php?d=224765

If that is all you are seeing, then you have not managed to acutally turn on debugging.

 
Average of ratings:Useful (1)
Picture of Fred Nasri
Re: Unable to create a Page
 

Hi,

Thanks for your reply.

You were right. I turned on all the options in debugging and got the following:

  ----------------------------------


Warning: include_once(...../lib/form/advcheckbox.php) [function.include-once]: failed to open stream:

No such file or directory in /.../lib/pear/HTML/QuickForm.php on line 565

Warning: include_once() [function.include]: Failed opening '/.../lib/form/advcheckbox.php' for inclusion

(include_path='/.../lib/zend:/.../lib/pear:.:/usr/lib/php') in ...../lib/pear/HTML/QuickForm.php on line 565

Fatal error: Class 'MoodleQuickForm_advcheckbox' not found in ...../lib/pear/HTML/QuickForm.php on line 566

 --------------------------------------

These are the lines that the error referes to in QuickForm.php. Lines 565 and 566 are in blue:

 

function &_loadElement($event, $type, $args)
    {
        $type = strtolower($type);
        if (!HTML_QuickForm::isTypeRegistered($type)) {
            $error = self::raiseError(null, QUICKFORM_UNREGISTERED_ELEMENT, null, E_USER_WARNING, "Element '$type' does not exist in HTML_QuickForm::_loadElement()", 'HTML_QuickForm_Error', true);
            return $error;
        }
        $className = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][1];
        $includeFile = $GLOBALS['HTML_QUICKFORM_ELEMENT_TYPES'][$type][0];
        include_once($includeFile);
        $elementObject = new $className(); //Moodle: PHP 5.3 compatibility
        for ($i = 0; $i < 5; $i++) {
            if (!isset($args[$i])) {
                $args[$i] = null;
            }
        }
        $err = $elementObject->onQuickFormEvent($event, $args, $this);
        if ($err !== true) {
            return $err;
        }
        return $elementObject;
    } // end func _loadElement

----------------------------------------

If you think the error is in any way related to the bug in moodle 2.4.2 you referred to, I 'll go for the latest 2.4.3+.

Thanks again for your time.

 
Average of ratings: -