Error/admin/sectionerror

From Learnit docs
Revision as of 10:51, 16 May 2019 by Docsadmin (talk | contribs) (Created page with "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_set...")
(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');

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

es:error/admin/sectionerror