Last modified: 2014-02-12 23:35:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 45848 - API is applying normalization that Title doesn't
API is applying normalization that Title doesn't
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: 27810 39480 38712
  Show dependency treegraph
Reported: 2013-03-07 15:58 UTC by Niklas Laxström
Modified: 2014-02-12 23:35 UTC (History)
2 users (show)

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

Script to illustrate the problem (1.52 KB, text/plain)
2013-03-07 16:27 UTC, Niklas Laxström

Description Niklas Laxström 2013-03-07 15:58:54 UTC
Please see bug 38712. After long debugging session I found out that API normalizes page titles silently.

This confuses the heck out things like LQT, which has logic like if (!$title->exists()) { /* call api internally to create the page */ }

I know that LQT should be calling WikiPage->doEdit directly, but that is orthogonal to this bug.

I see few options how to fix:
1) Do not normalize titles in API
2) Throw an error if title does not normalize to the same as given
3) Make Title constructors to normalize the title the same way

Given that from normal web viewing it is impossible to access the non-normalized title (goes to the normalized title), solution 3 looks most sensible.
Comment 1 Niklas Laxström 2013-03-07 16:27:45 UTC
Created attachment 11893 [details]
Script to illustrate the problem

Here is a script I used to test this.

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