Page MenuHomePhabricator

new versions of pdfinfo changed handling of -meta parameter in an incompatible way
Closed, ResolvedPublic

Description

All is setup including pre-reqs. Uploading I get no errors and the file thumbnail shows a PDF logo. When I go to place the image using [[File:testpdf.pdf]], it displays the clickable text File:testpdf.pdf, no rendered image.

Event Timeline

Stevenmeyerwiki raised the priority of this task from to Needs Triage.
Stevenmeyerwiki updated the task description. (Show Details)
Stevenmeyerwiki added a subscriber: Stevenmeyerwiki.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 5 2015, 2:45 AM

I am also getting "0 × 0 pixels, file size: 1.37 MB, MIME type:" upon upload after further investigation. I went to edit php.ini as said in https://www.mediawiki.org/wiki/Extension:PdfHandler but that text does not exist.

Thanks for reporting this.
Which MediaWiki version, which PdfHandler version, which PHP version is this about?

I apologize.
MediaWiki 1.25.3
PHP 5.5.9-1ubuntu4.14 (apache2handler)
MySQL 5.5.46-0ubuntu0.14.04.2
PDFHAndler 1.25

As a side note, I tried to insert the line "proc_get_status" to both php.ini files (apache 2 and cli). It still failed.

Not really. Has this also been brought up on https://www.mediawiki.org/wiki/Project:Support_desk yet?

This is typical behaviour if mediawiki cannot find the pdfinfo command line program. Make sure its installed.

Not really. Has this also been brought up on https://www.mediawiki.org/wiki/Project:Support_desk yet?

No, Should I open a new ticket there?

This is typical behaviour if mediawiki cannot find the pdfinfo command line program. Make sure its installed.

It seems to be.

Aklapper changed the task status from Open to Stalled.Oct 23 2017, 11:32 AM

Is this still a problem nowadays? If yes, which MediaWiki version is used?

Baumbuwewiki added a subscriber: Baumbuwewiki.EditedNov 1 2017, 7:26 AM

In 1.26.3 it is still present!

pdfinfo has changed its behavior, so trying to read image size in function retrieveMetaData() (in file Pdfhandler.image.php ) you don't get expected result while using parameter. -meta! Image size will be registered in database with 0 x 0 pixel and thumbnail/picture of pdf page won't be rendered.

It helps to comment out the two lines in this function with "-meta". and " -l 999999" or at least parameter "meta" (losing some metadata").

Could be solved by refactoring different information requests in separate function calls with differnt parameters!

See comment "Aschroet":
https://www.mediawiki.org/w/index.php?title=Topic:Tx35z09mbn9cmcp6&topic_showPostId=tzot0ekud62t24j5#flow-post-tzot0ekud62t24j5

1.26.3 is an old unsupported insecure version...

In a closed environment ...

I think it is more interesting to know whether this bug is under examination or - even better - already solved?

Nobody knows (or will examine) until somebody (you? someone else?) can confirm that this still happens on a recent and supported MediaWiki version :)

In 1.26.3 it is still present!
pdfinfo has changed its behavior, so trying to read image size in function retrieveMetaData() (in file Pdfhandler.image.php ) you don't get expected result while using parameter. -meta! Image size will be registered in database with 0 x 0 pixel and thumbnail/picture of pdf page won't be rendered.
It helps to comment out the two lines in this function with "-meta". and " -l 999999" or at least parameter "meta" (losing some metadata").
Could be solved by refactoring different information requests in separate function calls with differnt parameters!
See comment "Aschroet":
https://www.mediawiki.org/w/index.php?title=Topic:Tx35z09mbn9cmcp6&topic_showPostId=tzot0ekud62t24j5#flow-post-tzot0ekud62t24j5

Using which pdfinfo and what version of it (There are multiple forks of the pdfinfo utility).

This is clearly not the case in general for all versions of pdfinfo, since it totally works fine on wikipedia and friends.

In 1.26.3 it is still present!
pdfinfo has changed its behavior, so trying to read image size in function retrieveMetaData() (in file Pdfhandler.image.php ) you don't get expected result while using parameter. -meta! Image size will be registered in database with 0 x 0 pixel and thumbnail/picture of pdf page won't be rendered.
It helps to comment out the two lines in this function with "-meta". and " -l 999999" or at least parameter "meta" (losing some metadata").
Could be solved by refactoring different information requests in separate function calls with differnt parameters!
See comment "Aschroet":
https://www.mediawiki.org/w/index.php?title=Topic:Tx35z09mbn9cmcp6&topic_showPostId=tzot0ekud62t24j5#flow-post-tzot0ekud62t24j5

Using which pdfinfo and what version of it (There are multiple forks of the pdfinfo utility).
This is clearly not the case in general for all versions of pdfinfo, since it totally works fine on wikipedia and friends.

Err, the flow post had the actual useful information.

New versions of poppler pdfinfo changed how -meta worked https://bugs.freedesktop.org/show_bug.cgi?id=96801 - https://cgit.freedesktop.org/poppler/poppler/commit/utils/pdfinfo.cc?id=c91483aceb1b640771f572cb3df9ad707e5cad0d

So this is indeed a bug in PDFHandler.

Bawolff renamed this task from Images not rendering, displaying as a clickable link. to new versions of pdfinfo changed handling of -meta parameter in an incompatible way.Nov 14 2017, 6:01 PM
Aklapper changed the task status from Stalled to Open.Dec 6 2017, 3:25 PM
brion claimed this task.Apr 26 2018, 10:31 PM

Change 429356 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@master] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429356

Change 429358 had a related patch set uploaded (by Reedy; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@wmf/1.32.0-wmf.1] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429358

Change 429359 had a related patch set uploaded (by Reedy; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@REL1_31] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429359

Change 429358 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@wmf/1.32.0-wmf.1] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429358

Change 429362 had a related patch set uploaded (by Reedy; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@REL1_30] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429362

Change 429363 had a related patch set uploaded (by Reedy; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@REL1_29] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429363

Change 429364 had a related patch set uploaded (by Reedy; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@REL1_27] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429364

Change 429356 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@master] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429356

Change 429359 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@REL1_31] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429359

brion added a comment.Apr 27 2018, 2:26 AM

Fix is merged for new branches, will merge for older branches tomorrow after confirming the backport.

Change 429877 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/PdfHandler@REL1_28] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429877

Change 429364 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@REL1_27] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429364

Change 429363 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@REL1_29] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429363

Change 429362 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@REL1_30] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429362

Change 429877 merged by Brion VIBBER:
[mediawiki/extensions/PdfHandler@REL1_28] Fix for pdfinfo changes in poppler-utils 0.48

https://gerrit.wikimedia.org/r/429877

All seven patches mentioned here are resolved? @brion: Can this task be resolved? Or is there work left to do here?

Aklapper closed this task as Resolved.May 27 2019, 9:40 AM

No reply from @brion. Hence closing as resolved. Feel free to reopen if I'm wrong.