Last modified: 2014-02-12 23:35:52 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 T47848, the corresponding Phabricator task for complete and up-to-date bug report information.
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)
1.21.x
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: ---


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

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.


Navigation
Links