mediawiki.Title: Extension should be included when asserting that title is non-empty
Closed, ResolvedPublic

Description

Titles like ".dm" ( http://sah.wikipedia.org/wiki/.dm ) will throw an error when using the mw.Title constructor with them. Apparently mw.Title tries to be smart and treads this as a title with file extension. At least it enters mw.Title.setNameAndExtension() where the validation fails. '.123456' though will be accepted since the part behind the dot is longer than 5 characters.


Version: 1.19
Severity: normal

bzimport set Reference to bz38081.
Danwe created this task.Via LegacyJun 29 2012, 9:48 AM
Krinkle added a comment.Via ConduitJun 29 2012, 10:08 AM

Yeah, it shouldn't validate extensions because extensions are only an end-user convenience, no significant to them.

rephrasing summary to problem-solution orientation.

Krinkle added a comment.Via ConduitSep 5 2013, 1:06 AM

It fails because after stripping off the extension, the title is empty, which is invalid.

gerritbot added a comment.Via ConduitSep 6 2013, 12:40 AM

Change 83047 had a related patch set uploaded by Krinkle:
mw.Title: Rewrite from scratch (porting logic from Title.php)

https://gerrit.wikimedia.org/r/83047

Krinkle added a comment.Via ConduitSep 6 2013, 1:33 AM
  • Bug 51308 has been marked as a duplicate of this bug. ***
gerritbot added a comment.Via ConduitOct 4 2013, 3:24 AM

Change 83047 merged by jenkins-bot:
mw.Title: Rewrite from scratch (porting logic from Title.php)

https://gerrit.wikimedia.org/r/83047

Jdforrester-WMF added a comment.Via ConduitOct 4 2013, 5:23 AM

Fixed and merged. Thank you hugely to Timo, and to Roan for merging. Yay.

Jdforrester-WMF added a comment.Via ConduitOct 9 2013, 2:47 AM
  • Bug 55493 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitOct 9 2013, 2:48 AM
  • Bug 55494 has been marked as a duplicate of this bug. ***

Add Comment