Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: error/admin/sectionerror.

error/admin/sectionerror

From MoodleDocs
Revision as of 00:01, 17 June 2008 by Slobodan Jovcic (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The error means that a new admin page 'foo' (the one you're developing right now) is not registered with the Admin menu. It is triggered with the call:

admin_externalpage_setup('foo');

Solution is to add the registration code to admin/server.php:

if (file_exists("$CFG->dirroot/$CFG->admin/foo.php")) {
    $ADMIN->add('server', new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));
}