Last modified: 2014-05-07 16:24:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59837, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57837 - Course can be undeleted without undeleting its organization
Course can be undeleted without undeleting its organization
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
EducationProgram (Other open bugs)
master
All All
: Low normal (vote)
: ---
Assigned To: Andrew Green
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-02 14:50 UTC by Sage Ross
Modified: 2014-05-07 16:24 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sage Ross 2013-12-02 14:50:31 UTC
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).
Comment 1 Gerrit Notification Bot 2014-01-29 07:50:15 UTC
Change 110143 had a related patch set uploaded by AndyRussG:
No undeletion of courses of deleted institutions

https://gerrit.wikimedia.org/r/110143
Comment 2 Jeroen De Dauw 2014-01-29 23:14:14 UTC
The undeletion of the institution used to happen automatically. One more regression... really hurting because of the lack of tests I guess :|
Comment 3 Andrew Green 2014-01-30 10:55:50 UTC
Hi...! It's not a regression. There is code for the inverse--when you undelete an institution, the extension does try to re-create the courses that were deleted along with it--but not the other way 'round.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links