Page MenuHomePhabricator

Flow: Support wgCapitalLinks = false
Open, MediumPublic

Description

Currently, the tests fail if wgCapitalLinks is false, which is currently the case if you have CirrusSearch enabled in MediaWiki-Vagrant.

However, we should fix this in our own right. It will be required anyway if we deploy to Wiktionary. I think it may be enough to simply make Flow's topic namespace an alwaysCapitalizedNamespace (which I think would require a hook into core) The alternative could be to set wgCapitalLinkOverrides to true for the topic namespace. I'm not sure which is better. See https://git.wikimedia.org/blob/mediawiki%2Fcore.git/3a0b5d4d0ed8c497e1a96efdae237fb30a1ccd75/includes%2FMWNamespace.php#L362

I haven't yet confirmed Flow is okay with the actual human-readable namespace (e.g. Wikipedia talk) being case-sensitive. For that one, we'll have to support it if/when we run on wgCapitalLinks = false wikis, since e.g. on Wiktionary https://en.wiktionary.org/wiki/Talk:Apple and https://en.wiktionary.org/wiki/Talk:apple are the talk pages for entirely different entries.


Version: master
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=71778

Details

Reference
bz71779

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:53 AM
bzimport set Reference to bz71779.
bzimport added a subscriber: Unknown Object (MLST).

I tested with:

$wgCapitalLinkOverrides[NS_TOPIC] = true;

This could go in Flow.php I think.

In theory, modifying alwaysCapitalizedNamespaces would be slightly better I think. That would require a hook, though.

I forgot to say, the test worked to get the QUnit passing.

Seems to me Flow should not assume topics are always capitalized, since internally its UUIDs are lowercase. Maybe the tests could query &meta=siteinfo&siprop=namespaces to find out if case="case-sensitive" or "first-letter".

See also https://gerrit.wikimedia.org/r/#/c/192472/ ("Test only works if NS_MAIN is a capitalized namespace").