Page MenuHomePhabricator

Install Extension:Sort on all Wikimedia projects
Closed, DeclinedPublic

Description

Author: jasonspiro4

Description:
In response to my feature request (bug 4870) Rob Church kindly added a <sort>
feature to MediaWiki. Since AFAICT it's not enabled on enwiki, I bet it's not
other Wikipedias / Wikibooks / etc. It would be great if you could enable it.

Rob, I'm cc'ing you. Hope you don't mind.


Version: unspecified
Severity: enhancement

Details

Reference
bz9396

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:39 PM
bzimport set Reference to bz9396.
bzimport added a subscriber: Unknown Object (MLST).

yonatanh wrote:

*** This bug has been marked as a duplicate of 9395 ***

jasonspiro4 wrote:

That bug is about enwiki. This bug is about all other MediaWiki wikis. Reopening.

yonatanh wrote:

If you're asking for it to be enabled on all wikis then there shouldn't be a
separate bug for it being enabled on enwiki. You might as well add the request
for all other wikis in the other bug.

robchur wrote:

*** Bug 9395 has been marked as a duplicate of this bug. ***

jasonspiro4 wrote:

Who is a person with appropriate sysadmin powers that I could reassign this to? :)

mike.lifeguard+bugs wrote:

(In reply to comment #5)

Who is a person with appropriate sysadmin powers that I could reassign this to?
:)

Do we even know if the code is ready to be deployed? If not, then the shell keyword is pointless, since more coding is needed.

Seems to use natsort()...

$a = array(-5,-2,3,9);
natsort($a);
Array ( [1] => -2 [0] => -5 [2] => 0 [3] => 3 [4] => 9 )

...which is odd...

Also, the is no reverse natsort(), so it just reverses the items afterwards.

Gah, typo in test input above. Corrected:

C:\Users\Aaron>php -r "$a=array(-5,-2,0,3,9); natsort($a); print_r($a);"
Array
(

[1] => -2
[0] => -5
[2] => 0
[3] => 3
[4] => 9

)

The above issue is due to a lack of context. It should be specified in the <sort> tag it it is numeric or alphanumeric.

Also, the array_reverse() seems excessive; instead the array_keys should be done manually, and in a reverse for loop in that case.

jeluf wrote:

Closing for now.

Once the issues pointed out by Aaron are solved, each wiki community should decide whether they consider this extension as useful.

jasonspiro4 wrote:

After those problems are fixed, is there any reason why any wiki community wouldn't want a <sort> extension? :) Those who don't want sorted lists can simply not use the <sort> tag.

jasonspiro4 wrote:

Once Rob fixes those problems, is there any reason why any wiki community wouldn't want a <sort> extension? :) Those who don't want sorted lists can simply not use the <sort> tag.

jasonspiro4 wrote:

Once Rob fixes those problems, is there any reason why any wiki community wouldn't want a <sort> extension? :) Those who don't want sorted lists can simply not use the <sort> tag.

(In reply to comment #13)

Once Rob fixes those problems, is there any reason why any wiki community
wouldn't want a <sort> extension? :) Those who don't want sorted lists can
simply not use the <sort> tag.

As an aside, I don't think Rob is actively doing any mediawiki dev work at the moment (or for quite some time).

WONTFIX as long as comment 7 isn't handled which might be worth a separate bug report.

jasonspiro4 wrote:

(In reply to comment #15)

WONTFIX as long as comment 7 isn't handled which might be worth a separate
bug report.

Andre, I just filed a separate bug report. Bug 44451: "Extension:Sort doesn't handle negative numbers well; maybe it needs a special 'numeric mode'."

But Extension:Sort was designed for alphabetic sorting, which is fine for ordinary use cases like "See also" lists. Why do you want numeric sorting? And are you sure you want this bug to remain WONTFIX just because the extension is optimized for alphabetic sorting?

note sorting multilingually properly is hard. I personally think it would be nice if such an extension used the collation class to sort stuff (at least by default) in order to be consistent with categories.

as for wontfix-once (and if) this extension is modified to meet above criticism it can be reopened easily enough.

jasonspiro4 wrote:

People can keep on providing more requirements for Extension:Sort. But it is what it is. It was designed to handle the most common use cases, such as "See also" lists. You can install it on enwiki if you like, and enjoy its current (useful) functionality. Or you can go without it. :)

I'm not the maintainer. I'm not even a contributor. But I think that if you install it, then it's much more likely that contributors will step up and add the additional features you want.

Please do not file Extension:Sort feature requests here. Instead, please file them at https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&component=Sort.