Last modified: 2014-08-17 11:06:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39764, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37764 - InstantCommons doesn't display DjVu on some installs
InstantCommons doesn't display DjVu on some installs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
DjVu (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Tpt
:
Depends on:
Blocks: Wikisource
  Show dependency treegraph
 
Reported: 2012-06-21 03:02 UTC by Doug
Modified: 2014-08-17 11:06 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
djvdump of the Alice .djvu file (40.06 KB, text/plain)
2012-06-25 22:13 UTC, Antoine "hashar" Musso (WMF)
Details

Description Doug 2012-06-21 03:02:29 UTC
Reference the following examples:
http://www.wikilivres.ca/wiki/File:PhotographyTheoryAndPracticeOCRed.djvu#filehistory
http://wiki.doughendrick.com/wiki/File:Three_Books_of_Occult_Philosophy_(De_Occulta_Philosophia)_(1651).djvu
http://commons.wikimedia.beta.wmflabs.org/wiki/Help:DjVu

DjVu files are not thumbnailing.
For file space, the description page is displaying but the image is replaced with a gray box and the words: "Error creating thumbnail: Unable to fetch XML for DjVu file".  A similar result is obtained when the djvu is called inline as a 
There is know documentation for this issue.  

However, compare:
http://en.wikisource.org/wiki/File:Three_Books_of_Occult_Philosophy_(De_Occulta_Philosophia)_(1651).djvu

Use of DjVus on all Wikisources via InstantCommons is standard and does not exhibit this problem.

This issue has not been tested yet with pdfs or paged tiffs.
Comment 1 Chris McMahon 2012-06-21 13:50:54 UTC
Assigning to Antoine, as I think this is part of the ongoing beta cluster configuration.
Comment 2 Antoine "hashar" Musso (WMF) 2012-06-25 17:18:42 UTC
The files are there. Looks like an issue with DjVuImage::retrieveMetaData(). That method relies on command line utilities to get metadata as a XML:

- djvudump (output converted to XML)
- djvutoxml

Looks like $wgDjvuDump is properly setup:


$ mwscript eval.php commonswiki
> var_dump( $wgDjvuDump );
string(17) "/usr/bin/djvudump"

> var_dump( $wgDjvuToXML );
NULL

> 

The first utility seems to be indeed installed on beta apaches:

deployment-apache30:~$ djvudump
DJVUDUMP --- DjVuLibre-3.5.24
Describes DjVu and IFF85 files


Will need a bit more investigation.
Comment 3 Antoine "hashar" Musso (WMF) 2012-06-25 19:51:19 UTC
So I eventually a call ForeignAPIFile->getMetaData() returns null. Need to find out why there is no metadata.
Comment 4 Antoine "hashar" Musso (WMF) 2012-06-25 20:03:19 UTC
ForeignAPIFile does a query to the api.php, something like:

curl 'http://commons.wikimedia.org/w/api.php?titles=File%3AAlice_in_Wonderland.djvu&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&prop=imageinfo&iimetadataversion=2&format=json&action=query&redirects=true'

The json returned does not have any metadata apparently:

{
  "query": {
    "normalized": [{
      "from": "File:Alice_in_Wonderland.djvu",
      "to": "File:Alice in Wonderland.djvu"
    }],
    "pages": {
      "3567014": {
        "pageid": 3567014,
        "ns": 6,
        "title": "File:Alice in Wonderland.djvu",
        "imagerepository": "local",
        "imageinfo": [{
          "timestamp": "2007-10-01T21:06:20Z",
          "user": "Yann",
          "size": 3548027,
          "width": 2550,
          "height": 3562,
          "pagecount": 114,
          "comment": "
                    {
                        {Information\n|Description=Alice in Wonderland\n|Source=http:\/\/gutenberg.cc\/DjVu.htm\n|Date=1865\n|Author=Lewis Carroll\n|Permission=\n|other_versions=\n}
                    }
                    \n\n[[Category:En Wikisource book djvu]]\n",
          "url": "http:\/\/upload.wikimedia.org\/wikipedia\/commons\/2\/29\/Alice_in_Wonderland.djvu",
          "descriptionurl": "http:\/\/commons.wikimedia.org\/wiki\/File:Alice_in_Wonderland.djvu",
          "sha1": "0c0fff99f7c61272a602edb870ff59f3564e3723",
          "metadata": null,
          "mime": "image\/vnd.djvu"
        }]
      }
    }
  }
}
Comment 5 Antoine "hashar" Musso (WMF) 2012-06-25 22:13:04 UTC
Created attachment 10792 [details]
djvdump of the Alice .djvu file

djvdump of the Alice .. .djvu file from the Wikimedia apache server srv247.
Comment 6 Antoine "hashar" Musso (WMF) 2012-07-18 15:02:30 UTC
Stepping out of this bug and bringing it back to the pool. I am totally unfamiliar with our image metadata system and the specific dejavu system.
Comment 7 Tpt 2012-09-22 14:09:07 UTC
Patch submitted: https://gerrit.wikimedia.org/r/#/c/24660/
Comment 8 Andre Klapper 2013-07-23 09:45:44 UTC
Patch received a -1. Tpt, would you have time to rework your patch?
Comment 9 Gerrit Notification Bot 2013-12-05 22:52:39 UTC
Change 99544 had a related patch set uploaded by Brian Wolff:
Make DjVu metadata be stored as serialized PHP array.

https://gerrit.wikimedia.org/r/99544
Comment 10 Gerrit Notification Bot 2013-12-16 15:28:52 UTC
Change 24660 abandoned by Tpt:
(bug 37764) Allow imageInfo API query to give XML DJVU metadata

Reason:
I5c1d2d2434f70b57137837bade797d4133c47b70 is a far better solution.

https://gerrit.wikimedia.org/r/24660
Comment 11 555 2014-02-20 23:53:13 UTC
Adding bug 35925 (tracking), since this bug may block interested people to run Wikisource forks (DjVu is mostly used on Wikisource)
Comment 12 Gerrit Notification Bot 2014-04-12 00:00:47 UTC
Change 99544 merged by jenkins-bot:
Make DjVu metadata be stored as serialized PHP array.

https://gerrit.wikimedia.org/r/99544
Comment 13 Andre Klapper 2014-07-09 09:10:04 UTC
All patches mentioned in this report are either merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?
Comment 14 Andre Klapper 2014-08-17 11:06:22 UTC
No reply to comment 13 - assuming this bug is FIXED.
If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links