Page MenuHomePhabricator

ElectronPdfService extension. When collection is not installed. The Download PDF link still presents selection screen.
Closed, ResolvedPublic

Description

Reported @ https://www.mediawiki.org/wiki/Topic:Tm93yvmfi8zdh134

There seems to be a bug since change 3ca54d4d1c73: The download link generated by the extension still has as action 'download-electron-pdf' which is no longer recognized, hence the choice screen is shown.

This should fix it:

--- a/src/ElectronPdfServiceHooks.php

+++ b/src/ElectronPdfServiceHooks.php

@@ -90,7 +90,7 @@ class ElectronPdfServiceHooks {

                return $specialPageTitle->getLocalURL(

                        [

                                'page' => $title->getPrefixedText(),

-                               'action' => 'download-electron-pdf'

+                               'action' => 'redirect-to-electron'

                        ]

                );

        }

Event Timeline

Change 341527 had a related patch set uploaded (by wmde-fisch):
[mediawiki/extensions/ElectronPdfService] Fix redirect when no Collection extension is installed

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

Change 341527 merged by jenkins-bot:
[mediawiki/extensions/ElectronPdfService] Fix redirect when no Collection extension is installed

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