Last modified: 2014-11-07 14:06:00 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 T50834, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48834 - PdfHandler Fatal exception when used with MediaWiki 1.21
PdfHandler Fatal exception when used with MediaWiki 1.21
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
PdfHandler (Other open bugs)
master
All All
: Normal critical with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
https://www.mediawiki.org/wiki/Extens...
aklapper-moreinfo
:
Depends on:
Blocks: 41037
  Show dependency treegraph
 
Reported: 2013-05-26 11:31 UTC by Jamie Thingelstad
Modified: 2014-11-07 14:06 UTC (History)
11 users (show)

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


Attachments

Description Jamie Thingelstad 2013-05-26 11:31:53 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.
Comment 1 Andre Klapper 2013-05-29 12:23:39 UTC
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?
Comment 2 Sam Reed (reedy) 2013-05-29 12:28:54 UTC
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
Comment 3 Jamie Thingelstad 2013-05-29 12:58:51 UTC
I'm on master branch. git show says commit a6d53125e2852fee895c2980d469679f2dc491a8.
Comment 4 Greg Grossmeier 2013-05-29 18:09:58 UTC
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?
Comment 5 Jamie Thingelstad 2013-05-29 18:16:35 UTC
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?
Comment 6 Greg Grossmeier 2013-05-29 19:31:01 UTC
(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
Comment 7 Andre Klapper 2013-06-03 15:38:22 UTC
CC'ing xarax who is listed as an author of this extension (though not sure how active he still is).
Comment 8 Bawolff (Brian Wolff) 2013-06-17 03:57:45 UTC
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.
Comment 9 Jamie Thingelstad 2013-06-20 16:50:06 UTC
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.
Comment 10 Andre Klapper 2013-07-02 14:29:30 UTC
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. :(
Comment 11 ScottJL 2013-07-24 14:38:03 UTC
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
Comment 12 Bawolff (Brian Wolff) 2013-08-22 21:46:08 UTC
Split off the thumbnail on job queue to bug 53242
Comment 13 Andre Klapper 2014-08-15 13:30:54 UTC
Jamie: As MW 1.21 is now unmaintained, do you know if this is still a problem in 1.23 or 1.22?
Comment 14 Andre Klapper 2014-11-07 14:06:00 UTC
Jamie: As MW 1.21 is now unmaintained, do you know if this is still a problem in 1.23 or 1.22?

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


Navigation
Links