Page MenuHomePhabricator

Document wgCollectionDisableDownloadSection and fix the UI if this is false
Open, LowPublicBUG REPORT

Assigned To
None
Authored By
Mattrose
Aug 28 2024, 7:43 PM
Referenced Files
F57344535: document_variable2.patch
Aug 29 2024, 1:21 PM
F57329598: document_variable.patch
Aug 28 2024, 7:43 PM
F57329543: Screenshot 2024-08-28 15:36:18.png
Aug 28 2024, 7:43 PM
F57329496: Screenshot 2024-08-28 15:32:25.png
Aug 28 2024, 7:43 PM

Description

Steps to replicate the issue (include links if applicable):

  • Have an existing mwlib render server.
  • install Collection extension and configure LocalSettings.php to use the mwlib render server. (using the $wgCollectionMWServeURL variable)

What happens?:

There is nowhere in the Book Creator to have the Book Creator use your render server.

Screenshot 2024-08-28 15:32:25.png (565×1 px, 2 KB)

What should have happened instead?:

I should see a button to have my book rendered by my render server, Like this:

Screenshot 2024-08-28 15:36:18.png (565×1 px, 2 KB)

I should not have to read through the code to have to discover an undocumented configuration variable that mysteriously enables the section. This variable should at least be documented so that people with pre-existing mwlib render servers can continue to use it after upgrading.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

1.42.1

Other information (browser name/version, screenshots, etc.):

Patch attached. This is not an ideal solution, but it at least documents the variable, and fixes the UI if this variable is set to false. Should be applicable with git patch.

Event Timeline

Hmm, my screenshots didn't upload properly. Please let me know if you need me to re-upload them. It should be fairly obvious what I'm referring to if you just add `$wgCollectionMWServeURL = false and $wgCollectionMWServeURL = "http://localhost:8899";`to your LocalSettings.php

Change #1068103 had a related patch set uploaded (by Gerrit Patch Uploader; author: Gerrit Patch Uploader):

[mediawiki/extensions/Collection@master] Document wgCollectionDisableDownloadSection

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

Thanks for the patch. I've copied it into our code review system for review.

Cross-linking T285400 and T175996

Note that neither the collection extension nor mwlib have been actively maintained for years. So use at your own risk.

Reedy renamed this task from Document wgCollectionDisableDownloadSection and fix the UI if this is false. to Document wgCollectionDisableDownloadSection and fix the UI if this is false.Aug 28 2024, 9:19 PM
Reedy added a project: Documentation.

I entirely agree that nobody should start using this software, but I would bet I'm not the only person that has it on an older mediawiki, with a working render server, and upgrade their mediawiki install and find there's a bunch of warnings that tell you that something doesn't work anymore, when it actually does, if you look through the code and set an undocumented variable.

You say the Collection extension is unmaintained, but it has been actively updated to work with newer mediawiki versions. Also, people have started to work on the mwlib libraries again recently. There was a bunch of checkins about 8 months ago, that, I think finally ported the library to python3. I haven't actually tested this, but it seems that there is somebody out there working on these projects.

Also noticed that it complained about an un-initiated variable on one of the pages in debug mode, so the following patch fixes that.

Thanks for taking a look at the code. You are very welcome to use developer access to submit the last attachment as a Git branch directly into Gerrit which makes it easier for folks to review and provide feedback. If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader.

The latest version of the patch is on Gerrit at https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Collection/+/1068103

Our CI system already caught the undefined variable (as well as some code style violations) and I fixed it for you.

You say the Collection extension is unmaintained, but it has been actively updated to work with newer mediawiki versions

It's been maintained minimally, in the sense that if it starts throwing errors on WMF wikis someone will probably fix it. It's not been maintained in the sense that Collection-specific bug reports will probably not be handled.

I can apply for Developer access if you need me to push the patch into the Collection extension. I'm not too familiar with Gerrit's Code review system, so if one ofyou could push it that would be great!

I already uploaded the patch for review into Gerrit. Now someone with +2 access needs to review it. Our code review process is broken so this step can take a while sometimes.

Ah, I added a comment to one of the other linked bugs, so that might speed things up a bit.

Change #1079669 had a related patch set uploaded (by MarkAHershberger; author: MarkAHershberger):

[mediawiki/extensions/Collection@master] Refactor getPortlet into chunks

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

Jdlrobson-WMF moved this task from Backlog to Triaged (PHP) on the Collection board.