Last modified: 2013-05-29 00:44:12 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 T32213, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30213 - Check $wgEnableAPI for all javascript modules using the API
Check $wgEnableAPI for all javascript modules using the API
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Low enhancement (vote)
: ---
Assigned To: Kevin Israel (PleaseStand)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-04 09:19 UTC by Michael M.
Modified: 2013-05-29 00:44 UTC (History)
4 users (show)

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


Attachments

Description Michael M. 2011-08-04 09:19:03 UTC
OutputPage.php checks $wgUseAjax and some module specific configuration variables ($wgAjaxWatch, $wgEnableMWSuggest) before it includes javascript using AJAX. But $wgUseAjax isn't necessary, since these scripts don't use action=ajax any more. Instead it should check $wgEnableAPI (and $wgEnableWriteAPI for features that need it, like watching).
Both $wgEnableAPI and $wgEnableWriteAPIshould should also be checked together with $wgUseAJAXCategories.
Comment 1 Brion Vibber 2011-08-04 14:52:47 UTC
Hmm, $wgEnableAPI and $wgEnableWriteAPI should probably go away entirely at this point -- the API is generally assumed to always be on and usable these days, and lots of JS-side stuff depends on it.
Comment 2 Krinkle 2011-08-08 08:34:04 UTC
I agree. Though maybe ask on mediawiki-l for people that still use it and look at the possible use cases ?
Comment 4 Kevin Israel (PleaseStand) 2013-05-27 20:52:27 UTC
Brion, Krinkle: I sent in Gerrit change #63259 to remove the settings, and it was
pointed out that "[...] there's been no [current?] discussion around this, and
it's actually supported just fine [...] that's the tool's fault, not a disabled
API's fault."

I suppose I could bring this up on relevant mailing lists, though before
doing so, I'll note that some expressed concern about what this change might
mean for two groups of wikis: a) private wikis and b) wikis that want to
prevent users from exporting their articles.

Do you still believe these settings ought to be removed? Or should some
$wgEnableAPI && $wgEnableWriteAPI checks be added throughout the codebase, as
stated in comment 0?
Comment 5 Gerrit Notification Bot 2013-05-28 12:10:09 UTC
Related URL: https://gerrit.wikimedia.org/r/65785 (Gerrit Change If2ec219cfbb94e7c9718c58b9b54a508d0e0c656)
Comment 6 Tyler Romeo 2013-05-29 00:44:12 UTC
Change merged.

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


Navigation
Links