Page MenuHomePhabricator

Restrict randomarticle.php to main namespace only
Open, Needs TriagePublic


Getting a random page (not just article, but any namespace) does not need an external tool as it can already be done within WMF wikis using Special:RandomInCategory/...

What cannot be done on wiki is getting a random article in a category. Erwin's tool is called randomarticle.php (page title is also "random article") but it indeed returns pages from any namespace.

Therefore, I propose that it should be restricted to only pages in namespace = 0.

Alternatively, we can add a dropdown for namespace number, which if left blank would return a page from any namespace but if set to 0 would only return articles.

Getting a random article (not page) from a category is a desirable feature at least on fawiki.

Event Timeline

Huji created this task.Aug 15 2018, 1:00 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 15 2018, 1:00 PM
TheDJ added a subscriber: TheDJ.Aug 15 2018, 2:49 PM

I can add you as a maintainer to the project, you can create your own project, or you can simply open a ticket to expand the functionality of Core to provide this.

I do note that usually it is frowned upon in a category to mix content (articles) and administrative pages (basically anything not content), which makes me wonder how much of an actual problem this request solves.

TheDJ added a comment.Aug 15 2018, 2:50 PM

Basically I only redirected randomarticle.php to core functionality to keep existing links working. Other than that, I consider all of erwin's tools to be pretty much deprecated/dead.

Huji added a comment.EditedAug 15 2018, 9:11 PM

Okay then. Let me see if there is an appetite for adding this feature to Core (which will involve a new join, so I wouldn't hold my breath). If not, I will reach out to be added as a maintainer.

Where is the codebase for Erwin's tools located? I would be interested in joining the development team.