Page MenuHomePhabricator

Enable Wikitext for MediaWiki:Thumbnail_error
Open, MediumPublic

Description

Author: wiki.bugzilla

Description:
Please enable wikitext (or even html) for [[MediaWiki:Thumbnail error]] 
(that shows up as "Error creating thumbnail" by default, followed by a
closer, often "cryptic" hint about the specific cause).

It would be very useful and reasonable IMO to be able to link this message
to a page like "Help:Purge", [[Wikipedia:Bypass your cache]] or close, because
in most of the cases the only thing a user has to do is simply purging the cache.

On some days such errors appear numerously on the Wikimedia projects,
and usually nearly all the inexperienced users just remove affected images
from articles, what is quiet annoying in general (baseless loss of images).

Thanks in advance :-)


Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/wiki/MediaWiki:Thumbnail_error

Details

Reference
bz6044

Event Timeline

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

Created attachment 3285
1-line-patch

A simple 1-line-patch, but I cannot test this special error case :-(

Attached:

Not sure if this still is relevant. Checking MediaTransformOutput (class MediaTransformError, to be exact), shows the use of wfMsgReal. Beyond that I don't know.

There are 15 hits in core for "thumbnail_error". There is 1 wfMsg usage left: /var/www/w/includes/Linker.php: $s .= htmlspecialchars( wfMsg( 'thumbnail_error', '' ) );

The rest appears to either be able to display wiki text, or HTML.

a.d.bergi wrote:

Currently not working on http://de.wikipedia.org/wiki/Datei:Wasserhose_1884.png. The message source shows up 2 times in a <div class="MediaTransformError" style="[custom rectangle]">.

(In reply to comment #4)

Currently not working on
http://de.wikipedia.org/wiki/Datei:Wasserhose_1884.png. The message source
shows up 2 times in a <div class="MediaTransformError" style="[custom
rectangle]">.

Ehm, we need another example, now PNGs up tp 140 MB or so are correctly thumbed thanks to VipsScaler.

These errors mostly aren't user visible (on Wikimedia wikis. On non-wikimedia wikis they are quite visible). The type of users who knows how to actually view the file itself, probably already knows how to get to the help page.


Only possible objection I could maybe think of, is if we don't want the thumbnail servers spending time parsing things (edit: In 2019 this is no longer true as we use thumbor instead and don't use MW's stuff on WMF wikis), but I can't imagine people are going to be putting too complicated of things in these messages.

I don't think comment 1's patch would work. You'd want to change line 396 of MediaTransformOutput.php from

$this->htmlMsg = wfMessage( $msg )->rawParams( $htmlArgs )->escaped();

to

$this->htmlMsg = wfMessage( $msg )->rawParams( $htmlArgs )->parsed();

probably (untested)