Last modified: 2011-09-12 23:41:23 UTC
Currently, when you edit a page with categories, wgCategories = []; is empty and you can't use it. However, it would be quite useful to have this when editing, for example on the English Wikipedia for showing the [[Template:BLP editintro]] when an article is within [[Category:Living people]]. Currently, this only works when you view the article and press the "edit" link, but not otherwise.
Fixed in r91973
Reverted in r91974; this looks pretty wrong. Patch makes extra DB calls, assumes things about the 'action' request var, overrides output vars that may have been previously set elsewhere, fails to check for existence before hitting the db, and generally looks really funky. What exactly is this meant to do, and what side effects are possible? Is this even necessary or useful at all? Fetching random page metadata normally is something we'd expect JS to do via the API...
(In reply to comment #2) > Fetching random page metadata normally is something we'd expect JS to do via the API... Actually, this is indeed a better idea. Apparently, most folks at Wikimedia just haven't yet done so...
We've got: * ApiQueryCategories * ApiQueryCategoryInfo * ApiQueryCategoryMembers http://en.wikipedia.org/w/api.php?format=jsonfm&action=query&prop=categories&titles=Albert%20Einstein