Last modified: 2010-05-15 15:37:58 UTC
10:18 < Duesentrieb> the page is generated by ImagePage.php, lines 209 and 233
10:42 < mrgenixus> Duesentrieb noticed an error on page
with the mime reporting and I thik the problem is that the
$wgOut->addwikiText() needs the false parameter in lines
IIIII$wgOut->addHTML("<span class=\"fileInfo\"> (");
10:42 < mrgenixus> IIIII$wgOut->addWikiText( $info, false );
10:42 < mrgenixus> IIIII$wgOut->addHTML(")</span>");
10:42 < mrgenixus> oh,
10:42 < mrgenixus> nm
10:42 < mrgenixus> it's already there
10:42 < mrgenixus> but it doesn't work
error seems to be in parser.php, I think
$linestart is passed all the way to parse();
The effect of this can be seen on "Image:" pages for non-images, like this one:
<http://commons.wikimedia.org/wiki/Image:Wikimania-phase4.pdf>: the file-size
and mime-type in the perentecies should be inlined. The message comes from
MediaWiki:Fileinfo, no linebreaks are defined there.
The generated HTML looks like this:
<span class="fileInfo"> (<p>622KB, MIME type:
The question is: where do the <p> tags come from? The "newline" parameter of
addWikitext should suppress those, right?
I just installed the current HEAD - seems to work fine. So, the fix (whatever it
was) needs to be backported to 1.5 and applied to the live sites. This is a
little annoying on the commons, etc
Update: I was unable to find a difference between 1.5alpha4 and HEAD that would
explain why it's working now. Avar suggested that this problem may be caused by
html-tidy. This needs some more investigation, i guess...
Ok, I found the reason for this: tidy is applied individually to messages added
via addWikiText(). Tidy inserts <p> tags if there is not block element wrapping
the input. It would be much better to apply tidy only once, see bug #3119.
The tidy bit is correct behavior; wiki text blocks are blocks, and should be output whole.
Fix applied to HEAD and REL1_5:
* (bug 3117) Fix display of upload size and type with tidy on