Page MenuHomePhabricator

Wikisource Extension: ElectronPdfService links still appear on some wikis
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT


As a Wikisource user, I don't want any links that use the ElectronPdfService to show, so that I only download PDFs via WS-Export, which is a more reliable service.


If only the ElectronPdfService extension (but not the Collection extension) is installed, the ElectronPdfService link is not removed by the Wikisource extension.

I guess because it has its own <nav>, different from Collection, with id=p-electronpdfservice-sidebar-portlet-heading.

Looking in the production config, I think zhwikisource, srwikisource and zh_min_nanwikisource are the only wikisources with only ElectronPdfService installed.

Steps to reproduce problem
  1. Go to

Expected behavior: In the left sidebar, you will only see one "Download PDF" link
Observed behavior: You see both "Download as PDF" and "Download PDF"

Screenshots (if applicable):

ws+electron_content.png (588ร—155 px, 25 KB)

Acceptance Criteria:
  • Fix bug so that "Download as PDF" link is no longer displayed to users

Event Timeline

ifried set the point value for this task to 3.Feb 2 2021, 12:49 AM
ifried moved this task from Needs Discussion to Ready on the Community-Tech board.
ifried moved this task from Ready to Kanban-2020-21-Q3 on the Community-Tech board.

Change 661047 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/Wikisource@master] Handle ElectronPdfService sidebar portlet

Change 661047 merged by jenkins-bot:
[mediawiki/extensions/Wikisource@master] Handle ElectronPdfService sidebar portlet

The "Download as PDF" link has been removed when only ElectronPdfService is installed.

The side bar now looks like:

just_epdfs.png (515ร—162 px, 22 KB)

For regression purposes, I checked that the sidebar on was not changed.

Test environment: local vagrant Wikisource โ€“ (fe9e0fb), ElectronPdfService โ€“ (238c939).

ifried added a subscriber: ifried.

I have tested with the link provided in the description, and we're now only seeing one "Download PDF" link (see screenshot attached below). I'm marking this work as Done.

Screen Shot 2021-03-12 at 3.06.09 PM.png (1ร—2 px, 1 MB)