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

error/admin/sectionerror: Difference between revisions

From MoodleDocs
No edit summary
m (category)
 
Line 5: Line 5:


  $ADMIN->add("''parent_section''", new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));
  $ADMIN->add("''parent_section''", new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));
[[Category:Error|Admin]]

Latest revision as of 11:27, 2 January 2009

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');

The solution is to add a reference to the page in the appropriate file in admin/settings/XXX.php. Something like:

$ADMIN->add("parent_section", new admin_externalpage('foo', "Foo Admin Component", "$CFG->wwwroot/$CFG->admin/foo.php"));