Last modified: 2014-02-21 19:29:04 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 T62807, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60807 - Tab character in course title causes an error
Tab character in course title causes an error
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
EducationProgram (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-04 02:56 UTC by Sage Ross
Modified: 2014-02-21 19:29 UTC (History)
3 users (show)

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


Attachments

Description Sage Ross 2014-02-04 02:56:53 UTC
If you try to create a course that includes a tab in the title (which does not get rendered), you will be able to reach the 'create course' interface, but upon trying to save the page, you get an error, like this:

[3ae24f00] /w/index.php?title=Education_Program:NoDelete/Errorwat_(now)&action=edit Exception from line 68 of /vagrant/mediawiki/extensions/EducationProgram/includes/rows/PageObject.php: The title for a PageObject needs to be valid when saving.

Backtrace:

#0 /vagrant/mediawiki/extensions/EducationProgram/includes/rows/Course.php(313): EducationProgram\PageObject->save(NULL)
#1 /vagrant/mediawiki/extensions/EducationProgram/includes/rows/RevisionedObject.php(263): EducationProgram\Course->save()
#2 /vagrant/mediawiki/extensions/EducationProgram/includes/actions/EditAction.php(466): EducationProgram\RevisionedObject->revisionedSave(EducationProgram\RevisionAction)
#3 [internal function]: EducationProgram\EditAction->handleSubmission(array, EducationProgram\FailForm)
#4 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(443): call_user_func(array, array, EducationProgram\FailForm)
#5 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(385): HTMLForm->trySubmit()
#6 /vagrant/mediawiki/includes/htmlform/HTMLForm.php(400): HTMLForm->tryAuthorizedSubmit()
#7 /vagrant/mediawiki/extensions/EducationProgram/includes/actions/EditAction.php(188): HTMLForm->show()
#8 /vagrant/mediawiki/extensions/EducationProgram/includes/actions/EditAction.php(64): EducationProgram\EditAction->showForm()
#9 /vagrant/mediawiki/extensions/EducationProgram/includes/actions/EditCourseAction.php(94): EducationProgram\EditAction->onView()
#10 /vagrant/mediawiki/includes/Action.php(567): EducationProgram\EditCourseAction->onView()
#11 /vagrant/mediawiki/includes/Wiki.php(428): FormlessAction->show()
#12 /vagrant/mediawiki/includes/Wiki.php(292): MediaWiki->performAction(EducationProgram\CoursePage, Title)
#13 /vagrant/mediawiki/includes/Wiki.php(586): MediaWiki->performRequest()
#14 /vagrant/mediawiki/includes/Wiki.php(447): MediaWiki->main()
#15 /vagrant/mediawiki/index.php(49): MediaWiki->run()
#16 {main}
Comment 1 Sage Ross 2014-02-06 15:32:04 UTC
During course page creation, the course title gets pulled in from the user's input in the ep.addcourse.js module. The title gets normalized for the url of the "creating course" page, but the raw form of the input is loaded for page title and course name. Thus, either including inadvertant characters that get stripped out of the url (like a tab), or inserting any illegal title characters in the course adding/editing interface will result in this error upon save, the system tries to save an illegal value for the title.

Changing the title from the editing/adding interface will be disabled, so we'll just need to make sure the title from ep.addcourse.js either gets sanitized or gets fully validated as a legal title: https://www.mediawiki.org/wiki/Help:Bad_title
Comment 2 Sage Ross 2014-02-21 19:29:04 UTC
It is no longer possible (since 1.23wmf15) to change the title of a course, and the initial value gets properly stripped of illegal characters.

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


Navigation
Links