Page MenuHomePhabricator

Expose $wgMaxArticleSize through ApiQuerySiteinfo
Closed, ResolvedPublic


Could you expose $wgMaxArticleSize through ApiQuerySiteinfo ?

This will allow bots to know before hand what's the maximum allowed size for an article, and be able to trim edits correctly.

My own need is the following:
One of the task of my bot is to update maintenance pages with a list of pages containing some types of errors, and sometimes the produced list is bigger than the maximum allowed size for an article (2MB), so the API returns a "contenttoobig" error. Is it possible to know what the limit is before hitting it ?
Currently, I'm trimming the result progressively until the API stops complaining about the size...

Original request through the mailing list:


Related Gerrit Patches:

Event Timeline

NicoV created this task.Jun 25 2016, 3:46 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 25 2016, 3:46 PM
Florian claimed this task.Jun 25 2016, 4:41 PM
Florian triaged this task as Medium priority.

Change 296062 had a related patch set uploaded (by Florianschmidtwelzow):
Expose $wgMaxArticleSize in siteinfo query api

Restricted Application added a subscriber: Luke081515. · View Herald TranscriptJun 26 2016, 8:39 AM
Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.Jun 27 2016, 2:22 PM

Change 296062 merged by jenkins-bot:
Expose $wgMaxArticleSize in siteinfo query api

Anomie closed this task as Resolved.Jun 27 2016, 3:32 PM