Page MenuHomePhabricator

Max page length should be a system message
Closed, InvalidPublic


There is a hardcoded max page length in EditPage.php (for 1.5rc4 its on line
550). If the page size is larger than this value MediaWiki:Longpagewarning is
displayed at the top of the Edit Page. This maximum length should be a system
message so it can be customized by various wikis. Wikis that require longer
page lengths (like wikisource) could then raise that value.

The code currently looks like:
$kblength = (int)(strlen( $this->textbox1 ) / 1024);

if( $kblength > 29 ) {
  $wgOut->addWikiText( wfMsg( 'longpagewarning', $wgLang->formatNum( $kblength

) ) );


and should be something like:
$kblength = (int)(strlen( $this->textbox1 ) / 1024);

if( $kblength > wfMsg('longpagemaxvalue') ) {
  $wgOut->addWikiText( wfMsg( 'longpagewarning', $wgLang->formatNum( $kblength

) ) );


Probably have to convert wfMsg('longpagemaxvalue') to an int.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:50 PM
bzimport set Reference to bz3513.
bzimport added a subscriber: Unknown Object (MLST).

The warning size is directly based on known browser bugs, so would not be a
customizable thing.

Bugs for old browsers. The value is ignored on Wikisource anyway since it
doesn't make sense to break a novel up arbitrarily. We get an annoying message
for no good reason. See relavent discussion at