Page MenuHomePhabricator

ElectronPDFs should move Printable version link to its own section
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to a random article on sr.wiki
  2. Take a look at the sidebar, toolbox section ("Алатке"), item #5

Actual result:
You can see that printable version link ("Верзија за штампање") is displayed in the wrong section.
On most Wikipedias, the link is displayed in the print/export section. I guess sr.wiki uses a different printing method (thanks to @Srdjan_m).
When the languages in the sidebar were moved, the position of the link may not be harmonized for another method. (nope, that's not the reason)
Edit: On other wikis Extension:Collections moves the "Printable Version" ("Верзија за штампање") link into the "Print/Export" section. It seems that extension is not enabled on srwiki.
Expected result:
The link should be in the print/export section ("Штампање/извоз"), below download as PDF link -- "Преузмите (PDF)".

Event Timeline

Ammarpad subscribed.

Was it previously in the print/export section before the languages move? and does this occur with only the default vector skin or all skins?

Was it previously in the print/export section before the languages move? and does this occur with only the default vector skin or all skins?

Thanks for getting involved! Hmmm... Based on what I just saw on the Wayback Machine, the link does not appear to be in the correct position even before the change. I found that the link is not in the right place since [March] 2015. Will correct the task description.
The problem also occurs in Modern, Monobook, and Timeless skins.

ElectronPdf probably needs to unset the link in the toolbox just how Collection does it:

https://gerrit.wikimedia.org/g/mediawiki/extensions/Collection/+/5a099018de0eb654dfaecca4264596afc6db19bc/includes/CollectionHooks.php#67

Note whatever mechanism English Wikipedia is using is not foolproof either - notice how printable version shows in sidebar toolbox on:
https://en.wikipedia.org/wiki/MediaWiki:Sidebar
but shows in print/export on:
https://en.wikipedia.org/

Thank you! I guess ElectronPdfServiceHooks.php should be updated that way. Should I make a patch on Gerrit?

@Acamicamacaraca if you can that would be very helpful and I can certainly review!

Change 607087 had a related patch set uploaded (by Acamicamacaraca; owner: Acamicamacaraca):
[mediawiki/extensions/ElectronPdfService@master] Position change for the printable version link

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

Ammarpad renamed this task from Printable version link is displayed in the wrong place in the sidebar on Serbian Wikipedia to ElectronPDFs should move Printable version link to its own section.Jun 22 2020, 7:38 PM

@Acamicamacaraca Is it possible that Extension:Collections is not enabled on srwiki?
On enwiki that extension moves the "Printable Version" ("Верзија за штампање") link into the "Print/Export" section.
You can tell the difference by looking at the "Print/Export" section's ID:

  • p-coll-print_export with Collections (eg. enwiki)
  • p-electronpdfservice-sidebar-portlet-heading withOUT Collections (srwiki).

Change 607087 merged by jenkins-bot:
[mediawiki/extensions/ElectronPdfService@master] Position change for the printable version link

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

Jdlrobson claimed this task.

@Demian it's not installed on srwiki and that's why the behavior was different https://sr.wikipedia.org/wiki/%D0%9F%D0%BE%D1%81%D0%B5%D0%B1%D0%BD%D0%BE:%D0%92%D0%B5%D1%80%D0%B7%D0%B8%D1%98%D0%B0 - the behavior should be consistent now, thanks to the above patch with one caveat relating to load order found during testing (T256071).

The branch has been cut (Tuesday 02:00UTC), so this will roll out until next week. Thanks @Acamicamacaraca for your perseverance and @Ammarpad for your guidance!

@Acamicamacaraca Is it possible that Extension:Collections is not enabled on srwiki?
On enwiki that extension moves the "Printable Version" ("Верзија за штампање") link into the "Print/Export" section.
You can tell the difference by looking at the "Print/Export" section's ID:

  • p-coll-print_export with Collections (eg. enwiki)
  • p-electronpdfservice-sidebar-portlet-heading withOUT Collections (srwiki).

You're late :)). It's solved.

@Demian it's not installed on srwiki and that's why the behavior was different

You're late :)). It's solved.

Yes... that's what I've written...
Anyway, I was happy to help. It's not a race.