Last modified: 2013-04-16 08:53:12 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 T18394, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16394 - Generic Edit Page: Under certain circumstances it is possible to add the same category to a page twice
Generic Edit Page: Under certain circumstances it is possible to add the same...
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Uniwiki (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Tom Maaswinkel
extension[unmaintained]
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-19 22:44 UTC by Robert Leverington
Modified: 2013-04-16 08:53 UTC (History)
3 users (show)

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


Attachments

Description Robert Leverington 2008-11-19 22:44:10 UTC
When a page is already in a category that contains spaces and when the same category is added again it appears in the list of categories, but disappears on save.  Similar behaviour is also seen when using abnormal capitalisation.  It appears the JavaScript is not doing sufficient sanitization or checking.
Comment 1 Splarka 2008-11-19 23:07:47 UTC
It isn't feasable for javascript to sanitize/normalize titles, as they are very dynamic depending on settings and content language, registered namespaces, namespace aliases, namespace redirects, interwiki prefixes, and interlang prefixes.

I suggest hitting the API before save (or incrementally) to look for dupes using title normalization, for example:
 http://en.wikipedia.org/w/api.php?action=query&titles=Category:Foo|category:Bar|Category:%20Baz
    <normalized>
      <n from="category:Bar" to="Category:Bar" />
      <n from="Category: Baz" to="Category:Baz" />
    </normalized>

You can also use this for language/alias normalization:
 http://fr.wikipedia.org/w/api.php?action=query&titles=Category:Foo|category:Bar|Category:%20Baz

And as an added feature, you can also check the existence of the categories (in the <pages> section, missing="").

Also, you can do all this without ajax:
 importScriptURI(wgServer + wgScriptPath + '/api.php?action=query&titles=Category:Foo|category:Bar|Category:%20Baz&format=json&callback=someFunction');
 function someFunction(obj) {
   //obj is the data
 }
Comment 2 Tom Maaswinkel 2009-01-27 11:25:45 UTC
Seems to be fixed in the current revision. Can you please review the bug and/or provide steps to reproduce?!
Comment 3 Robert Leverington 2009-04-05 10:20:40 UTC
Confirmed this is still an issue in trunk.

Steps to reproduce:
 1. Edit a page.
 2. Add a category called "Test".
 3. Add a category called "test".
 4. Press save.

Only one category is added to the page, although two were listed on the edit page - the second one should have been normalised to "Test".
Comment 4 Andre Klapper 2013-04-16 08:53:12 UTC
According to one of its developer (Mark), Uniwiki extensions for MediaWiki are not under active development anymore "and it is safe to declare them obsolete/wontfix."

It is unlikely that there will be any further active development.

Closing this report as WONTFIX as part of Bugzilla Housekeeping and adding the whitespace entry "extension[unmaintained]". Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development again.

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


Navigation
Links