Guild Wars 2 Wiki:Requests for technical administration/Collation
From Guild Wars 2 Wiki
Jump to navigationJump to search
Collation[edit]
- Title
- Collation settings $wgCategoryCollation and $smwgEntityCollation
- Type
- Change to MediaWiki and Semantic MediaWiki settings in mw:Manual:LocalSettings.php
- Reason
- Collation - sorting pages numerically
- Recently the Property:Has item value was changed to
text
(previouslynumber
) resulting in e.g.{{#ask: [[Has item cost::>574]] [[Has vendor::Historian Vermoth]]}}
only returning #vendor19 which is the 574 Karma item only ignoring other higher costs e.g. 42000 Karma -574 (Karma)
being greater than42000 (Karma)
(5 vs 4). - This would also fix nav ordering e.g. Hunter's Journal with the journals currently being sorted
1, 10, 11, ... 19, 2, 3, 4, ... 9
instead of1, 2, ... 19
. - Links
- mw:Manual:$wgCategoryCollation, smw:Help:$smwgEntityCollation, Guild Wars 2 Wiki talk:Requests for technical administration#Sorting pages with numbers.
- Possible pitfalls
- —
- Notes
- For $wgCategoryCollation the default is
uppercase
, while $smwgEntityCollation has the default ofidentity
and the SMW page assumes that both settings are the same. - Numeric sorting only works for unbroken sequences of digits. Digits separated by commas, periods, or spaces are treated as separate numbers.
- Installation steps
- Swapping $wgCategoryCollation and $smwgEntityCollation to
numeric
oruca-en-u-kn
. Both settings should receive the same value.uca-<langcode>-u-kn
has language-specific adjustments and numeric sorting.
- $wgCategoryCollation (introduced with MW version 1.17.0)
- Write
$wgCategoryCollation = 'uca-en-u-kn';
in mw:Manual:LocalSettings.php and then run mw:Manual:updateCollation.php for your change to take effect. - After changing this option, you must run mw:Manual:updateCollation.php to recompute sort keys for all pages, or your categories will be sorted inconsistently.
- Updating collations is slow and may take several hours on large wikis.
uca-default
/uca-xx
collations require the PHP intl extension- If you are using Varnish, Squid or file cache, you may have to purge category pages after running updateCollation.php to see the results.
- If you update or recompile your version of PHP, you must run updateCollation.php --force.
- Write
- $smwgEntityCollation (introduced with SMW version 3.0.0)
- Write
$smwgEntityCollation = uca-en-u-kn;
in mw:Manual:LocalSettings.php file after the enableSemantics() call - Maintenance script "updateEntityCollation.php" has to be run after changing the stetting of this configuration parameter.
- Write