Task #79038

PDF rendering is broken

Added by Chris topher almost 4 years ago. Updated almost 4 years ago.

On Hold
Should have
Start date:
Due date:
% Done:


Estimated time:


The HTML in the left-hand menu is displayed as it should. But the functionality is broken: Rendering of a page to PDF fails with

Book rendering failed: 

There was an error while attempting to render your book.

Updated by Chris topher almost 4 years ago

The error message is coming from https://github.com/wikimedia/mediawiki-extensions-Collection/blob/4a9142e0d21e6187a4b4843fbfc6d2d48679cc27/Collection.body.php#L1326.

Creation of a PDF page is coming from

private function handleResult( $result ) {
    if ( !$result->isError() ) {
        return true;
    ); // the error we see.

and before that:

$response = $api->render( $collection );
if ( !$this->handleResult( $response ) ) {

Without any changes, it is sometimes working e.g. for the main page. The error is not always reproducable.

As a workaround, I edited Collection/RenderingAPI.php, function isError():

    public function isError() {
        if( isset( $this->response['error'] ) && $this->response['error'] ) {
            error_log("Erweiterung Collection: Es ist ein Fehler aufgetreten und zwar: " . $this->response['error']);
        return false; // No matter what, always pretend there would not have been an error. ChSt.

Although this is not what the function is there for, creation of the PDF file obviously is working then...

Enabling the MediaWiki debug log shows this:

Start request GET /wiki/index.php?title=Special:Book&bookcmd=render_article&arttitle=Ts45min&returnto=Ts45min&oldid=77131&writer=rl
Fully initialised
[connect] Connected to database 0 at localhost
[MessageCache] MessageCache::load: Loading en... local cache is empty, got from global cache

HTTP: POST: http://tools.pediapress.com/mw-serve/
[collection] Server returned error: system overloaded. please try again later.

Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
MediaWiki::preOutputCommit: all transactions committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
OutputPage::sendCacheControl: no caching **
Request ended normally
[session] Saving all sessions on shutdown

The problem obviously is not on our side, but it is the render server, which is overloaded.


Updated by Chris topher almost 4 years ago

  • Status changed from New to On Hold

Also available in: Atom PDF