Generic Edit Page: Under certain circumstances it is possible to add the same category to a page twice
Closed, DeclinedPublic

Assigned To

Author: robert

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.

Version: unspecified
Severity: minor
Whiteboard: extension[unmaintained]

bzimport set Reference to bz16394.
bzimport created this task.Via LegacyNov 19 2008, 10:44 PM
bzimport added a comment.Via ConduitNov 19 2008, 11:07 PM

herd wrote:

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:|category:Bar|Category:%20Baz

  <n from="category:Bar" to="Category:Bar" />
  <n from="Category: Baz" to="Category:Baz" />

You can also use this for language/alias normalization:|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


bzimport added a comment.Via ConduitJan 27 2009, 11:25 AM

tom.maaswinkel wrote:

Seems to be fixed in the current revision. Can you please review the bug and/or provide steps to reproduce?!

bzimport added a comment.Via ConduitApr 5 2009, 10:20 AM

robert wrote:

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".

Aklapper added a comment.Via ConduitApr 16 2013, 8:53 AM

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.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.