Last modified: 2014-10-16 12:15:52 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 T49994, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47994 - dumpHtml does not receive thumbnail images using [[Image:image.png|thumb|alt=description|description]]
dumpHtml does not receive thumbnail images using [[Image:image.png|thumb|alt=...
Status: UNCONFIRMED
Product: MediaWiki extensions
Classification: Unclassified
DumpHTML (Other open bugs)
REL1_21-branch
All All
: Lowest major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-02 14:12 UTC by skualito
Modified: 2014-10-16 12:15 UTC (History)
1 user (show)

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


Attachments

Description skualito 2013-05-02 14:12:50 UTC
Hello,

i have images inserted like this:

[[Image:image.png|thumb|alt=description|description]]

and dumpHTML do not retrieve these images.

i launch dumpHTML with this command line:

php extensions/wikimedia-mediawiki-extensions-DumpHTML-dd18651/dumpHTML.php -k monobook --image-snapshot --force-copy --group user --munge-title md5
Comment 1 marvin_stgt 2013-08-15 08:17:34 UTC
Had the same problem and this is how I solved it by some small changes in dumpHTML.inc (just a quick 'n dirty workaround, not meant to be a proper fix):
1.) Uncomment this lines:
    # $images = $this->findImages( $text );
    # $this->copyImages( $images );
2.) For some strange reason the links to the thumbnails did not work as 2F/(.*)/2F/ is added to the paths. So I added this line just before the last line of function getArticleHTML:
$image = preg_replace("|/thumb2F/(.*)/2F//|","/thumb/",$TEXT);
3.) dumpHTML uses the standard thumb size 180px, but my Wiki uses 120px, so I had to change that as well with this line (just add where all other user options are set):
$wgUser->setOption( 'thumbsize', 0 );
Comment 2 skualito 2013-08-22 12:23:16 UTC
Hello,

i have done your modifications but it doesnt work, i have the following errors:

Initialising destination directory...
Creating static HTML dump in directory /homez.227/astrolol/wiki/static. 
Using database mysql51-89.bdb
Starting from page_id 1 of 86
Processing ID: 1
<br />sing ID: 31
<b>Warning</b>:  copy(/homez.227/astrolol/wiki/images/thumbc/3/1/b02148ebf64e6af4655ebc25c8ce0.png) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in <b>/homez.227/astrolol/wiki/extensions/wikimedia-mediawiki-extensions-DumpHTML-dd18651/dumpHTML.inc</b> on line <b>888</b><br />
Warning: unable to copy /homez.227/astrolol/wiki/images/thumbc/3/1/b02148ebf64e6af4655ebc25c8ce0.png to /homez.227/astrolol/wiki/static/images/thumbc/3/1/b02148ebf64e6af4655ebc25c8ce0.png
<br />
<b>Warning</b>:  copy(/homez.227/astrolol/wiki/images/thumb6/5/8/b3c3ff1b2a2f8a64c2f2c5db6b3d6.png) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in <b>/homez.227/astrolol/wiki/extensions/wikimedia-mediawiki-extensions-DumpHTML-dd18651/dumpHTML.inc</b> on line <b>888</b><br />
Warning: unable to copy /homez.227/astrolol/wiki/images/thumb6/5/8/b3c3ff1b2a2f8a64c2f2c5db6b3d6.png to /homez.227/astrolol/wiki/static/images/thumb6/5/8/b3c3ff1b2a2f8a64c2f2c5db6b3d6.png
<br />
<b>Warning</b>:  copy(/homez.227/astrolol/wiki/images/thumbc/f/9/5161fdbdb38b3507af2f780c17204.png) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in <b>/homez.227/astrolol/wiki/extensions/wikimedia-mediawiki-extensions-DumpHTML-dd18651/dumpHTML.inc</b> on line <b>888</b><br />
Warning: unable to copy /homez.227/astrolol/wiki/images/thumbc/f/9/5161fdbdb38b3507af2f780c17204.png to /homez.227/astrolol/wiki/static/images/thumbc/f/9/5161fdbdb38b3507af2f780c17204.png
<br />
<b>Warning</b>:  copy(/homez.227/astrolol/wiki/images/thumbe/5/b/d2cc5c52f147b367affd79c3a4b6a.png) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in <b>/homez.227/astrolol/wiki/extensions/wikimedia-mediawiki-extensions-DumpHTML-dd18651/dumpHTML.inc</b> on line <b>888</b><br />
Warning: unable to copy /homez.227/astrolol/wiki/images/thumbe/5/b/d2cc5c52f147b367affd79c3a4b6a.png to /homez.227/astrolol/wiki/static/images/thumbe/5/b/d2cc5c52f147b367affd79c3a4b6a.png
<br />sing ID: 51
<b>Warning</b>:  copy(/homez.227/astrolol/wiki/images/thumb1/4/c/b552b161b8fc654c36fefb8550e09.png) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in <b>/homez.227/astrolol/wiki/extensions/wikimedia-mediawiki-extensions-DumpHTML-dd18651/dumpHTML.inc</b> on line <b>888</b><br />
Warning: unable to copy /homez.227/astrolol/wiki/images/thumb1/4/c/b552b161b8fc654c36fefb8550e09.png to /homez.227/astrolol/wiki/static/images/thumb1/4/c/b552b161b8fc654c36fefb8550e09.png
/bin/bash: line 1:  7637 Aborted                 convert -background white -thumbnail 800x541\! '/homez.227/astrolol/wiki/images/3/31/Network_l3.svg' PNG:'/tmp/transform_2ee4c9ce3c83-1.png' 2>&1
/bin/bash: line 1:  7642 Aborted                 convert -background white -thumbnail 800x541\! '/homez.227/astrolol/wiki/images/3/31/Network_l3.svg' PNG:'/tmp/transform_2a97c774b4dd-1.png' 2>&1
/bin/bash: line 1:  7877 Aborted                 convert -background white -thumbnail 120x81\! '/homez.227/astrolol/wiki/images/3/31/Network_l3.svg' PNG:'/tmp/transform_5914be8840a1-1.png' 2>&1
/bin/bash: line 1:  7899 Aborted                 convert -background white -thumbnail 800x441\! '/homez.227/astrolol/wiki/images/e/e6/Network_l2.svg' PNG:'/tmp/transform_74d45fc07030-1.png' 2>&1
/bin/bash: line 1:  7904 Aborted                 convert -background white -thumbnail 800x441\! '/homez.227/astrolol/wiki/images/e/e6/Network_l2.svg' PNG:'/tmp/transform_4208e1c92df9-1.png' 2>&1
/bin/bash: line 1:  7909 Aborted                 convert -background white -thumbnail 120x66\! '/homez.227/astrolol/wiki/images/e/e6/Network_l2.svg' PNG:'/tmp/transform_73fa63d6ed37-1.png' 2>&1
Comment 3 skualito 2013-08-23 14:26:41 UTC
ok i need to remove the '--munge-title md5' parameter and change your rewrite line

$image = preg_replace("|/thumb2F/(.*)/2F//|","/thumb/",$text);

by

$text = preg_replace("|/thumb2F/(.*)/2F//|","/thumb/",$text);

and now it is ok.

thanks !

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


Navigation
Links