Last modified: 2011-09-12 23:41:23 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 T26254, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24254 - wgCategories should be available when editing or doing another action than viewing the page
wgCategories should be available when editing or doing another action than vi...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-04 13:12 UTC by The Evil IP address
Modified: 2011-09-12 23:41 UTC (History)
2 users (show)

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


Attachments

Description The Evil IP address 2010-07-04 13:12:07 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.
Comment 1 DieBuche 2011-07-12 16:54:07 UTC
Fixed in r91973
Comment 2 Brion Vibber 2011-07-12 17:24:29 UTC
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...
Comment 3 The Evil IP address 2011-09-12 14:40:44 UTC
(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...
Comment 4 Krinkle 2011-09-12 23:41:04 UTC
We've got:

* ApiQueryCategories
* ApiQueryCategoryInfo
* ApiQueryCategoryMembers

http://en.wikipedia.org/w/api.php?format=jsonfm&action=query&prop=categories&titles=Albert%20Einstein

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


Navigation
Links