Page MenuHomePhabricator

Expose $wgMaxArticleSize through ApiQuerySiteinfo
Closed, ResolvedPublic

Description

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: https://lists.wikimedia.org/pipermail/mediawiki-api/2016-June/003760.html

Event Timeline

Florian triaged this task as Medium priority.

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

https://gerrit.wikimedia.org/r/296062

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

https://gerrit.wikimedia.org/r/296062