Last modified: 2014-11-07 14:06:00 UTC
There is a bug breaks *all* file uploads when using PdfHandler with MediaWiki 1.21. The exception is: Detected bug in an extension! Hook CreatePdfThumbnailsJob::insertJobs failed to return a value; should return true to continue hook processing or false to abort. Backtrace: #0 /srv/www/mediawiki/public_html/w/includes/GlobalFunctions.php(3883): Hooks::run('UploadVerifyFil...', Array) #1 /srv/www/mediawiki/public_html/w/includes/upload/UploadBase.php(430): wfRunHooks('UploadVerifyFil...', Array) #2 /srv/www/mediawiki/public_html/w/includes/upload/UploadBase.php(299): UploadBase->verifyFile() #3 /srv/www/mediawiki/public_html/w/includes/upload/UploadFromFile.php(97): UploadBase->verifyUpload() #4 /srv/www/mediawiki/public_html/w/includes/specials/SpecialUpload.php(406): UploadFromFile->verifyUpload() #5 /srv/www/mediawiki/public_html/w/includes/specials/SpecialUpload.php(172): SpecialUpload->processUpload() #6 /srv/www/mediawiki/public_html/w/includes/SpecialPage.php(613): SpecialUpload->execute(NULL) #7 /srv/www/mediawiki/public_html/w/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL) #8 /srv/www/mediawiki/public_html/w/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext)) #9 /srv/www/mediawiki/public_html/w/includes/Wiki.php(565): MediaWiki->performRequest() #10 /srv/www/mediawiki/public_html/w/includes/Wiki.php(458): MediaWiki->main() #11 /srv/www/mediawiki/public_html/w/index.php(59): MediaWiki->run() #12 {main} I'm guessing this has to do with the changes to the job queue in 1.21. I've temporarily disabled the extension. This exception will be thrown for uploads of any type, not just PDF uploads.
Which exact version of PdfHandler is used? I assume git master, as there is no REL1_21 branch? https://gerrit.wikimedia.org/r/#/q/status:merged+project:mediawiki/extensions/PdfHandler+-owner:L10n-bot,n,z does not show much recent activity, hence wondering who to CC here. Greg: Any idea?
The code in master is fine, returning true on all paths https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/PdfHandler.git;a=blob;f=CreatePdfThumbnailsJob.class.php;h=aba204f28704f2f776e6bceeb039ddb49aa53e42;hb=HEAD Sounds like it's using an older version of the extension
I'm on master branch. git show says commit a6d53125e2852fee895c2980d469679f2dc491a8.
Jamie: You're on the master for just the extension right? The issue is how that (doesn't) work with specifically the 1.21 release?
Correct, I'm on master for the extension and am on the minutes old 1.21.1 release. Is master incompatible with 1.21.x?
(In reply to comment #5) > Correct, I'm on master for the extension and am on the minutes old 1.21.1 > release. Is master incompatible with 1.21.x? Not sure, but it appears so! Thanks for noting this bug on the PdfHandler talk page: https://www.mediawiki.org/wiki/Extension_talk:PdfHandler#Exception_with_1.21
CC'ing xarax who is listed as an author of this extension (though not sure how active he still is).
What version of PHP are you using. Specifically is it earlier than 5.2.3? ---- Also what do you have $wgPdfCreateThumbnailsInJobQueue set to in LocalSettings.php (or is it just the default false) When I have that variable set to true I get the exception: Could not find data for image 'Elastic_load_method_(full).pdf'. Backtrace: #0 /var/www/w/git/includes/filerepo/file/LocalFile.php(471): LocalFile->loadExtraFromDB() #1 /var/www/w/git/includes/filerepo/file/LocalFile.php(666): LocalFile->load(1) #2 /var/www/w/extensions/PdfHandler/CreatePdfThumbnailsJob.class.php(110): LocalFile->getMetadata() #3 [internal function]: CreatePdfThumbnailsJob::insertJobs(Object(UploadFromStash), 'application/pdf', true) #4 /var/www/w/git/includes/Hooks.php(196): call_user_func_array('CreatePdfThumbn...', Array) #5 /var/www/w/git/includes/GlobalFunctions.php(3834): Hooks::run('UploadVerifyFil...', Array) #6 /var/www/w/git/includes/upload/UploadBase.php(435): wfRunHooks('UploadVerifyFil...', Array) #7 /var/www/w/git/includes/upload/UploadBase.php(302): UploadBase->verifyFile() #8 /var/www/w/git/includes/specials/SpecialUpload.php(406): UploadBase->verifyUpload() #9 /var/www/w/git/includes/specials/SpecialUpload.php(172): SpecialUpload->processUpload() #10 /var/www/w/git/includes/SpecialPage.php(631): SpecialUpload->execute(NULL) #11 /var/www/w/git/includes/SpecialPageFactory.php(487): SpecialPage->run(NULL) #12 /var/www/w/git/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext)) #13 /var/www/w/git/includes/Wiki.php(565): MediaWiki->performRequest() #14 /var/www/w/git/includes/Wiki.php(458): MediaWiki->main() #15 /var/www/w/git/index.php(55): MediaWiki->run() #16 {main} Maybe your version of PHP handles the exception differently from within call_user_func_array and treats it as if the function returned null, or something weird like that.
Assuming the PHP version question is to me. I'm running: % php --version PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli) (built: Mar 11 2013 14:34:31) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH I do not have $wgPdfCreateThumbnailsInJobQueue set in LocalSettings.php.
I'm moving this down to high prio as it seems to be somehow specific to the configuration. Though still no idea how to track this down further. :(
Same issue here, different PHP version: # php --version PHP 5.3.10-1ubuntu3.7 with Suhosin-Patch (cli) (built: Jul 15 2013 18:05:44) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
Split off the thumbnail on job queue to bug 53242
Jamie: As MW 1.21 is now unmaintained, do you know if this is still a problem in 1.23 or 1.22?