Page MenuHomePhabricator

Collection extension should be made aware of the ElectronPdf extension
Open, Needs TriagePublic


When running both the Collection and ElectronPdf extension a single menu is used to collate all links by the two extensions

wfLoadExtension( 'ElectronPdfService' );

However, if switch the order in LocalSettings.php like so:

wfLoadExtension( 'ElectronPdfService' );

I will get two print sections in the sidebar.

Acceptance criteria

  • I'd advise settling on a common sidebar key for both extensions, or duplicating the logic in ElectronPdfService to be aware of Collection extension so that Collection considers ElectronPdfs existence.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 22 2020, 10:16 PM
Demian added a subscriber: Demian.EditedJun 23 2020, 4:45 PM

I'd advise settling on a common sidebar key for both extensions

I wanted to suggest this solution as well. It's clean, simple and removes the undefined behavior and the branching logic in ElectronPdf. The order of the links in the portlet remain dependent on the load order, but that's only a minor concern, which also applies to other extensions adding links to sidebar portlets - notably the toolbox.