When the expansion size is reached, the editor is not warned about it
Closed, ResolvedPublic


Author: nicdumz

proposed patch

An editor previewing a page using too many parser functions is warned "Warning: This page contains too many expensive parser function calls", and the page is put in a maintenance category.

This is not the case when you include too many templates in a page/use too long template arguments. Of course, one can dig into the HTML source, but that is not really user-friendly.

This patch tries to handle that issue, adding two more warning messages, and two more maintenance categories.

I'd like some more experienced users to review it so that I can commit it :)

Version: 1.13.x
Severity: enhancement

Attached: postexpandWarnings.diff

bzimport added a project: MediaWiki-Interface.Via ConduitNov 21 2014, 10:14 PM
bzimport set Reference to bz14094.
bzimport created this task.Via LegacyMay 12 2008, 3:55 PM
brion added a comment.Via ConduitMay 19 2008, 8:45 PM

Perhaps change getWarnings() to encapsulate that array_keys() call?

The check for addWarning() existence probably got moved over from when this lived in ParserFunctions, so couldn't be sure what version parser was present; it ought to be safe to remove that check now.

On this:
+ if ( is_null( $current ) || is_null( $max ) ) {
+ $warning = wfMsg( $msgName );
+ } else {
+ $warning = wfMsg( $msgName, $current, $max);
+ }

it should be quite safe to just pass them on; they'll do no harm if present but unused.

bzimport added a comment.Via ConduitMay 19 2008, 9:34 PM

nicdumz wrote:

Thanks for the review :)

Committed, with your changes, in r35059

Add Comment