Last modified: 2014-07-30 13:54:32 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 T61147, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59147 - PDF fails to render on PostgreSQL and FreeBSD
PDF fails to render on PostgreSQL and FreeBSD
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
PdfHandler (Other open bugs)
unspecified
All FreeBSD
: Normal major (vote)
: MW 1.23 version
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: postgres
  Show dependency treegraph
 
Reported: 2013-12-30 22:55 UTC by Kaya Saman
Modified: 2014-07-30 13:54 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
umherirrender_de.wp: Backport_to_Stable+


Attachments
PDF Not Rendering (152.70 KB, image/png)
2013-12-30 22:55 UTC, Kaya Saman
Details

Description Kaya Saman 2013-12-30 22:55:30 UTC
Created attachment 14196 [details]
PDF Not Rendering

Platform: FreeBSD 8.3 x64
PHP: 5.3.28 (fpm-cgi)
PostgreSQL DB: 9.2.4

Upon deletion of PDF file the error below is observed:

<error> 
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "Revision::fetchFromConds". Database returned error "0A000: ERROR: SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer join ".
</error>


In addition PDF files won't render either... possibly attributed to the error above (see attachment)


PdfHandler Extension is active in LocalSettings.php and in addition all paths for various tools are correct (gs, imagemagick, convert etc...)
Comment 1 Sam Reed (reedy) 2013-12-30 22:57:15 UTC
What version of MediaWiki are you using?
Comment 2 Kaya Saman 2013-12-30 23:28:37 UTC
Hi, version 1.21.3
Comment 3 Andre Klapper 2014-01-02 12:34:22 UTC
https://www.mediawiki.org/wiki/Manual:How_to_debug probably doesn't help much either here, hmm.  Which PDFHandler branch is this about?
Comment 4 Bawolff (Brian Wolff) 2014-01-02 14:57:46 UTC
(In reply to comment #3)
> https://www.mediawiki.org/wiki/Manual:How_to_debug probably doesn't help much
> either here, hmm.  Which PDFHandler branch is this about?

I suspect this more has to do with core then with pdf stuff. Can you delete non pdf files fine
Comment 5 Kaya Saman 2014-01-02 15:15:01 UTC
Hi, the PDF Handler version is:

https://git.wikimedia.org/tree/mediawiki%2Fextensions%2FPdfHandler

2013-12-07 

basically, I used the link above to grab the .tar.gz file.


Everything else works fine, I can delete and render everything; even using the TimedMediaHandler plugin to handle ogg and m4v files and works perfectly.
Comment 6 Andre Klapper 2014-01-02 20:28:11 UTC
So you are running extension's git master with MW 1.21. The extension's 1.21 branch would be https://git.wikimedia.org/log/mediawiki%2Fextensions%2FPdfHandler/REL1_21
Comment 7 Kaya Saman 2014-01-02 20:45:35 UTC
I've just re-installed the extension from the link above and unfortunately same thing :-(

<----error
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
(SQL query hidden)
from within function "Revision::fetchFromConds". Database returned error "0A000: ERROR: SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer join ".
----->

and page still not rendering "thumb" properly either:

http://www.optiplex-networks.com/index.php?title=File:Hp-2230s-review-final-2.pdf


??
Comment 8 Bawolff (Brian Wolff) 2014-01-02 21:24:10 UTC
It probably won't make much of a difference in this case, but please add to the bottom of LocalSettings.php

$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;
Comment 9 Kaya Saman 2014-01-02 21:32:02 UTC
We have some more output:


A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_format,rev_content_model,page_namespace,page_title,page_id,page_latest,page_is_redirect,page_len,user_name FROM "revision" INNER JOIN "page" ON ((page_id = rev_page)) LEFT JOIN "mwuser" ON ((rev_user != 0) AND (user_id = rev_user)) WHERE page_id = '19' AND rev_id = '41' LIMIT 1 FOR UPDATE
from within function "Revision::fetchFromConds". Database returned error "0A000: ERROR: SELECT FOR UPDATE/SHARE cannot be applied to the nullable side of an outer join ".
Backtrace:
#0 /usr/local/www/www/includes/db/DatabasePostgres.php(482): DatabaseBase->reportQueryError('ERROR: SELECT ...', '0A000', 'SELECT rev_id,...', 'Revision::fetch...', false)
#1 /usr/local/www/www/includes/db/Database.php(983): DatabasePostgres->reportQueryError('ERROR: SELECT ...', '0A000', 'SELECT rev_id,...', 'Revision::fetch...', false)
#2 /usr/local/www/www/includes/db/Database.php(1434): DatabaseBase->query('SELECT rev_id,...', 'Revision::fetch...')
#3 /usr/local/www/www/includes/Revision.php(372): DatabaseBase->select(Array, Array, Array, 'Revision::fetch...', Array, Array)
#4 /usr/local/www/www/includes/Revision.php(314): Revision::fetchFromConds(Object(DatabasePostgres), Array, 3)
#5 /usr/local/www/www/includes/Revision.php(294): Revision::loadFromConds(Object(DatabasePostgres), Array, 3)
#6 /usr/local/www/www/includes/Revision.php(143): Revision::newFromConds(Array, 3)
#7 /usr/local/www/www/includes/WikiPage.php(575): Revision::newFromPageId(19, 41, 3)
#8 /usr/local/www/www/includes/WikiPage.php(615): WikiPage->loadLastEdit()
#9 /usr/local/www/www/includes/WikiPage.php(2543): WikiPage->getContent(3)
#10 /usr/local/www/www/includes/FileDeleteForm.php(185): WikiPage->doDeleteArticleReal('', false, 0, false, '', Object(User))
#11 /usr/local/www/www/includes/FileDeleteForm.php(110): FileDeleteForm::doDelete(Object(Title), Object(LocalFile), '', '', false, Object(User))
#12 /usr/local/www/www/includes/ImagePage.php(875): FileDeleteForm->execute()
#13 /usr/local/www/www/includes/actions/DeleteAction.php(45): ImagePage->delete()
#14 /usr/local/www/www/includes/Wiki.php(439): DeleteAction->show()
#15 /usr/local/www/www/includes/Wiki.php(305): MediaWiki->performAction(Object(ImagePage), Object(Title))
#16 /usr/local/www/www/includes/Wiki.php(565): MediaWiki->performRequest()
#17 /usr/local/www/www/includes/Wiki.php(458): MediaWiki->main()
#18 /usr/local/www/www/index.php(59): MediaWiki->run()
#19 {main}
Comment 10 Kaya Saman 2014-02-24 20:08:01 UTC
I just upgraded to Mediawiki 1.22.2, and additionally updated the extension.

Good news is that I was able to delete the PDF file; the bad news is that it still doesn't render the first page as the I believe the PDFHandler extension is supposed to do:

"
The PdfHandler extension shows uploaded pdf files in a multipage preview layout. With the Proofread Page extension enabled, pdfs can be displayed side-by-side with text for transcribing books and other documents, as is commonly done with DjVu files (particularly in Wikisource).
"

-- From here: http://www.mediawiki.org/wiki/Extension:PdfHandler
Comment 11 db [inactive,noenotif] 2014-03-01 11:14:43 UTC
The file delete part was bug 60531
Comment 12 Gerrit Notification Bot 2014-04-23 07:03:31 UTC
Change 129109 had a related patch set uploaded by Jjanes:
PostgreSQL: decode image.img_metadata

https://gerrit.wikimedia.org/r/129109
Comment 13 Gerrit Notification Bot 2014-05-05 23:19:44 UTC
Change 129109 merged by jenkins-bot:
PostgreSQL: decode image.img_metadata

https://gerrit.wikimedia.org/r/129109
Comment 14 Umherirrender 2014-05-09 19:37:57 UTC
blob handling for postgres was successfully merged
Comment 15 Gerrit Notification Bot 2014-05-09 20:50:31 UTC
Change 132508 had a related patch set uploaded by Jjanes:
PostgreSQL: decode image.img_metadata

https://gerrit.wikimedia.org/r/132508
Comment 16 Gerrit Notification Bot 2014-05-09 20:58:45 UTC
Change 132510 had a related patch set uploaded by Jjanes:
PostgreSQL: decode image.img_metadata

https://gerrit.wikimedia.org/r/132510
Comment 17 Gerrit Notification Bot 2014-05-11 09:16:51 UTC
Change 132508 merged by jenkins-bot:
PostgreSQL: decode image.img_metadata

https://gerrit.wikimedia.org/r/132508
Comment 18 Andre Klapper 2014-05-16 22:28:22 UTC
Only https://gerrit.wikimedia.org/r/#/c/132510/ remaining for review (for 1.22 branch) here.

Jjanes: Anything else needed to fix this?
Comment 19 Jeff Janes 2014-05-20 20:34:46 UTC
Andre:  I have not tested on FreeBSD, and can't readily do so.  But I see no reason to think it behaves differently than Linux does in this regard, until someone else reports otherwise.

Should it also go into final EOL release of 1.21 ?

Other than those, I think that is all for this issue.
Comment 20 Gerrit Notification Bot 2014-07-30 12:50:04 UTC
Change 132510 merged by Mglaser:
PostgreSQL: decode image.img_metadata

https://gerrit.wikimedia.org/r/132510
Comment 21 Umherirrender 2014-07-30 13:54:32 UTC
successfully merged on release branch

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


Navigation
Links