Page MenuHomePhabricator

Could not find data for image on pdf upload
Closed, ResolvedPublic

Description

Author: vpovilaitis

Description:
pdf

Could not find data for image 'Linkuvos_gimnazijos_laikkra\u0161t\u0117lis_Varpelis_79.pdf'.

Backtrace:

#0 /nas/enciklopedija/w/includes/filerepo/file/LocalFile.php(471): LocalFile->loadExtraFromDB()
#1 /nas/enciklopedija/w/includes/filerepo/file/LocalFile.php(666): LocalFile->load(1)
#2 /nas/enciklopedija/w/extensions/PdfHandler/CreatePdfThumbnailsJob.class.php(110): LocalFile->getMetadata()
#3 [internal function]: CreatePdfThumbnailsJob::insertJobs(Object(UploadFromFile), 'application/pdf', true)
#4 /nas/enciklopedija/w/includes/Hooks.php(196): call_user_func_array('CreatePdfThumbn...', Array)
#5 /nas/enciklopedija/w/includes/GlobalFunctions.php(3872): Hooks::run('UploadVerifyFil...', Array)
#6 /nas/enciklopedija/w/includes/upload/UploadBase.php(475): wfRunHooks('UploadVerifyFil...', Array)
#7 /nas/enciklopedija/w/includes/upload/UploadBase.php(302): UploadBase->verifyFile()
#8 /nas/enciklopedija/w/includes/upload/UploadFromFile.php(97): UploadBase->verifyUpload()
#9 /nas/enciklopedija/w/includes/specials/SpecialUpload.php(406): UploadFromFile->verifyUpload()
#10 /nas/enciklopedija/w/includes/specials/SpecialUpload.php(172): SpecialUpload->processUpload()
#11 /nas/enciklopedija/w/includes/SpecialPage.php(628): SpecialUpload->execute(NULL)
#12 /nas/enciklopedija/w/includes/SpecialPageFactory.php(486): SpecialPage->run(NULL)
#13 /nas/enciklopedija/w/includes/Wiki.php(291): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#14 /nas/enciklopedija/w/includes/Wiki.php(565): MediaWiki->performRequest()
#15 /nas/enciklopedija/w/includes/Wiki.php(458): MediaWiki->main()
#16 /nas/enciklopedija/w/index.php(59): MediaWiki->run()
#17 {main}


Version: master
Severity: normal

Attached:

Details

Reference
bz48700

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz48700.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.May 22 2013, 7:58 AM

Hi Vpovilaitis, which MediaWiki version is this about, and what are the exact steps to reproduce this problem?

vpovilaitis wrote:

MediaWiki version is 1.22alpha (abf3a8f). You can see at http://lietuvai.lt/wiki/Specialus:Versija

Problem was on upload pdf. I made several uploads, of diferent pdf files, including and pdf files witch was uploded with the older wersion of MediaWiki and PdfHandler.

I'm comment aut $IP/includes/filerepo/file/LocalFile.php 471 line ( /*$this->loadExtraFromDB();*/ ). After that this problem was solved. But I don't know may bee this my solution is not very good, but this temporary solve a problem.

Please recomend a better solution.

PDF was created with Microsoft 2010, metadata looks correct to me.

http://commons.wikimedia.beta.wmflabs.org/wiki/Special:UploadWizard says
"The upload succeeded, but the server could not get a preview thumbnail."

Same message in bug 48178 comment 8.

Doesn't seem to be happening in WMF production based on bawolff's quick investigation. Dropping priority to normal.

I think comment 4 is unrelated.

Some sort of race condition?

Issue happens if a file object is created, but when trying to load metadata from db, no image row.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:39 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:39 PM
matmarex changed the task status from Open to Stalled.Jul 20 2016, 3:23 PM
matmarex added a subscriber: matmarex.

PDF was created with Microsoft 2010, metadata looks correct to me.

http://commons.wikimedia.beta.wmflabs.org/wiki/Special:UploadWizard says
"The upload succeeded, but the server could not get a preview thumbnail."

I can no longer reproduce this on http://commons.wikimedia.beta.wmflabs.org/wiki/Special:UploadWizard or https://commons.wikimedia.org/wiki/Special:UploadWizard. The file thumbnail is shown correctly.

Aklapper closed this task as Resolved.Nov 16 2017, 1:08 AM

Closing as this cannot be reproduced anymore nowadays. Please reopen if you can still reproduce.

Poikilotherm reopened this task as Open.EditedJan 10 2018, 12:03 PM
Poikilotherm added a subscriber: Poikilotherm.

Dear all,

I can reproduce this with any kind of PDF on my private MediaWiki installation, no matter the size or content.

Edit: there also seem to be others with the same issue: https://www.mediawiki.org/wiki/Topic:Tmobfxre108n6rn5

Using:

MediaWiki1.27.4 (cc61b62)
PHP5.6.32 (fpm-fcgi)
MySQL5.6.37-log
ICU50.1.2
Lua5.1.5
CentOS7.4 latest patches

Extensions:

PDF Handler(847b64e) branch REL1_27
plus some more...

I am using a cronjob for the background job queue.

Relevant config options:

$wgEnableUploads = true;
$wgImgAuthPublicTest = false;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = '/usr/bin/convert';
$wgJobRunRate = 0;
require "$IP/extensions/PdfHandler/PdfHandler.php";
$wgPdfCreateThumbnailsInJobQueue = false;

If I set $wgPdfCreateThumbnailsInJobQueue = true;, uploads of PDFs fails with the exception described by the task opener. Set to false, things start moving again.

I'm willing to help tackle this down. Also willing to create a clone of my installation without content. Any help is appreciated.

Thanks in advance!

Cheers
Oliver

matmarex removed a subscriber: matmarex.Jan 15 2018, 8:42 PM

Hi,
I am having the same issue and I described it here. I tried everything related with folders permissions but nothing seems to work; and the issue is not related with SELinux or AppArmor as well, since I disabled them and the problem still occurs.

In my case did not even work setting $wgPdfCreateThumbnailsInJobQueue = false;.

Thanks for your help!
Cheers,
Lorenzo

UPDATE
After disabling PdfHandler, I succeeded to upload pdfs; enabling it again and all the thumbnails are correctly generated, so the issue is just during the upload process.

jijiki closed this task as Resolved.Feb 22 2019, 7:21 PM
jijiki claimed this task.