error/admin/sectionerror: Difference between revisions
From MoodleDocs
No edit summary |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
admin_externalpage_setup('foo'); | 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")); | |||
[[Category:Error|Admin]] | |||
[[es:error/admin/sectionerror]] | |||
// You can purge all cache instead and see if it works. Site administration / ► Development / ► Purge all caches |
Latest revision as of 22:51, 11 December 2017
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"));
// You can purge all cache instead and see if it works. Site administration / ► Development / ► Purge all caches