Last modified: 2014-09-01 13:44:57 UTC
See URL. Some weird output instead of size info somewhere, probably: we even have "× pixels, file size: 93 KB, MIME type: image/vnd.djvu" shown in a pre, thumbs URLs are not even included. Seems a regression because the file had been added to https://no.wikipedia.org/wiki/Kristnisaga Bigger example at https://commons.wikimedia.org/wiki/File:Federal_Cases_28_extra.djvu
Testing with several other Djvu files on Wikisource they can still be opened, it's "just" the preview being broken. Checking if this Djvu file is broken itself woudl also be good. => Normal priority. Note that the visual outcome here is similar to PDF bug 41281 (but that does not mean that it's the same code failing).
(In reply to comment #1) > Testing with several other Djvu files on Wikisource they can still be opened, > it's "just" the preview being broken. Which other DjVu? If you find more like this, please report them. > Checking if this Djvu file is broken > itself woudl also be good. The DjVu surely has some oddity and this bug is about finding it, but okular opens it without a glitch.
For the message it seems that you have 'w x h' of 'MediaWiki:file-info-size. w and h are substituded with blanks because they are not known and then you have " x ", which is then parsed as wiki text, which converts the leading spacing to a pre block. Solution is to insert ' ' or '0' into the message if the size cannot be calculated (seems most other media formats use '0'.
This issue probably became visible only last year, since then we moved the () outside of MediaWiki:file-info-size.
I don' know what's the best way to show info about a DjVu, but: $ ddjvu -verbose /var/tmp/Federal_Cases_28_extra.djvu > /dev/null -------- page 1 ------- This is a legal Compound DjVu image. DJVU Image (2839x4078, 300 dpi) version 25: 0.0 Kb 'INFO' Page information. 0.0 Kb 'CIDa' Unrecognized chunk. 8.6 Kb 'Sjbz' JB2 foreground mask (2839x4078, 300 dpi). 0.2 Kb 'FG44' IW44 foreground colors (237x340, 25 dpi). 1.1 Kb 'BG44' IW44 background (947x1360, 100 dpi). 0.2 Kb 'BG44' IW44 background (part 2, 100 dpi). 0.0 Kb 'BG44' IW44 background (part 3, 100 dpi). 0.3 Kb 'BG44' IW44 background (part 4, 100 dpi). 0.9 Kb 'TXTz' Text (text, etc.). Compression ratio: 2976 (11.4 Kb) Decoding time: 42 ms Rendering time: 125 ms Producing PPM file.
See also bug 37764 which is about the API not returning metadata for DjVU files. It has a patch in Gerrit change #24660.
Might be the same bug: http://wikilivres.ca/wiki/File:Photography_Theory_And_Practice_OCRed.djvu Causes "Error: no such file" on http://wikilivres.ca/wiki/Index:Photography_Theory_And_Practice_OCRed.djvu
To clarify, is there anything still needing doing here? https://commons.wikimedia.org/wiki/File:Federal_Cases_28_extra.djvu looks fine to me.
(In reply to Bawolff (Brian Wolff) from comment #8) > To clarify, is there anything still needing doing here? > https://commons.wikimedia.org/wiki/File:Federal_Cases_28_extra.djvu looks > fine to me. The spacepre was fixed because it now says "0 × 0 pixel", but the DjVu is still not rendered: no size information, no thumbnails. Okular reads it fine.
Umm, I get: Original file (2,839 × 4,078 pixels, file size: 79.16 MB, MIME type: image/vnd.djvu, 1,410 pages) with a thumbnail, etc for the file from commons The WikiLivres one looks broken, but that's probably due to a configuration issue on their end (Probably $wgDjvuDump is set to the wrong thing or something)
Sorry, I misclicked. (The https://commons.wikimedia.org/wiki/File:Federal_Cases_28_extra.djvu is working but the other djvus are not) https://commons.wikimedia.org/wiki/File:Kristnisaga.djvu
(In reply to Marco from comment #11) > Sorry, I misclicked. (The > https://commons.wikimedia.org/wiki/File:Federal_Cases_28_extra.djvu is > working but the other djvus are not) > > https://commons.wikimedia.org/wiki/File:Kristnisaga.djvu Action=purge seemed to fix that for me. Any other known examples?
Closing again as per comment 12.