If an organization gets deleted, all associated courses are deleted along with it. A course can then be undeleted without restoring the organization. This results in a warning stack track that obscures much of the interface, like this:
Warning: array_key_exists(): The first argument should be either a string or an integer in /vagrant/mediawiki/extensions/EducationProgram/includes/actions/ViewCourseAction.php on line 55 Call Stack: 0.0008 645240 1. {main}() /vagrant/mediawiki/index.php:0 0.1446 14297928 2. MediaWiki->run() /vagrant/mediawiki/index.php:49 0.1447 14297928 3. MediaWiki->main() /vagrant/mediawiki/includes/Wiki.php:460 0.2181 21129312 4. MediaWiki->performRequest() /vagrant/mediawiki/includes/Wiki.php:596 0.2293 22275320 5. MediaWiki->performAction() /vagrant/mediawiki/includes/Wiki.php:305 0.2374 23006616 6. FormlessAction->show() /vagrant/mediawiki/includes/Wiki.php:441 0.2725 25638392 7. EducationProgram\ViewCourseAction->onView() /vagrant/mediawiki/includes/Action.php:567 0.2811 26733376 8. EducationProgram\ViewAction->onView() /vagrant/mediawiki/extensions/EducationProgram/includes/actions/ViewCourseAction.php:105 0.2881 27075080 9. EducationProgram\ViewCourseAction->displayNavigation() /vagrant/mediawiki/extensions/EducationProgram/includes/actions/ViewAction.php:121 0.2988 27306112 10. array_key_exists() /vagrant/mediawiki/extensions/EducationProgram/includes/actions/ViewCourseAction.php:55
It should probably just not be possible to undelete a course without first undeleting the institution. Attempting to undelete it should either prompt the user on whether they want to undelete the org as well (this would be better), or just indicate that it cannot be undeleted unless the org is undeleted first (this would be good enough).
Version: master
Severity: normal