Last modified: 2014-11-17 09:21:20 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 T26837, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24837 - LiquidThreads API namespaces don't include canonical key (breaking API change)
LiquidThreads API namespaces don't include canonical key (breaking API change)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
LiquidThreads (Other open bugs)
unspecified
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Andrew Garrett
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-18 01:28 UTC by MZMcBride
Modified: 2014-11-17 09:21 UTC (History)
7 users (show)

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


Attachments

Description MZMcBride 2010-08-18 01:28:38 UTC
[09:37] <werdna> So I added localisation to LiquidThreads namespaces
[09:37] <werdna> for some reason this added them to all wikis
[09:37] <werdna> which is hugely annoying
[09:38] <werdna> some feature of the localisation cache

Now http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces&format=jsonfm isn't outputting "canonical" values for the new namespaces. E.g.,

			"90": {
				"id": 90,
				"case": "first-letter",
				"*": "Thread"
			},

This breaks expected behavior for some scripts like Python wikitools, which contain code like:

			if ns != "0":
				attr = "NS_%s" % (nsdata[ns]['canonical'].replace(' ', '_').upper())
			else:
				attr = "NS_MAIN"
Comment 1 Niklas Laxström 2010-08-18 07:04:55 UTC
Right, I didn't see this coming. WMF uses combined localisation cache for all wikis, and if the extension isn't loaded, those wont have canonical namespaces. In wikis where lqt is enabled, they should have both.

Anyway, I see no easy solution for this. Any suggestions?
Comment 2 Niklas Laxström 2010-08-18 08:30:28 UTC
Okay few ideas:
1) Do not use unified l10n cache
2) Filter out namespace which are not defined in canonical namespaces
Comment 3 Andrew Garrett 2010-08-20 05:33:11 UTC
Note that while this is a bug, the actual breakage is the fault of the bots themselves, they should be able to handle such issues.

Code bug fixed in r71327, will deploy to Wikimedia sites shortly.
Comment 4 Andrew Garrett 2010-08-20 05:45:45 UTC
Deployed.
Comment 5 MZMcBride 2010-08-20 20:11:17 UTC
(In reply to comment #3)
> Note that while this is a bug, the actual breakage is the fault of the bots
> themselves, they should be able to handle such issues.

It's my understanding that every namespace except NS:0 will have a canonical namespace. Missing a key isn't something that scripts are designed to handle generally if there's an understood expectation that a key will always be present.

Thank you for fixing the bug. :-)

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


Navigation
Links