Page MenuHomePhabricator

Add a configuration variable for namespaces to suggest pages from
Closed, ResolvedPublic

Description

Currently, LinkSuggest uses $wgContentNamespaces for the list of namespaces to suggest pages from. Normally this is fine, but on Yugipedia this means that pages from various ancillary custom namespaces get suggested as well, which should rarely actually be linked to. Removing these namespaces from $wgContentNamespaces isn't appropriate for us, though, since we want them to be accessible from Special:Random, to count towards the {{NUMBEROFARTICLES}} count, etc.

Therefore we'd like if a configuration variable could be added to allow overriding $wgContentNamespaces for the purpose of listing the namespaces this extension should suggest pages from (allowing it to default to $wgContentNamespaces, to preserve the current behavior, is fine).

Event Timeline

Change 657422 had a related patch set uploaded (by Martineznovo; owner: Martineznovo):
[mediawiki/extensions/LinkSuggest@master] Add a configuration variable for namespaces to suggest pages from

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

Ciencia_Al_Poder triaged this task as Medium priority.

Content namespaces make sense for search results, but not for link suggestions, since one usually wants to explicitly type the namespace when filling a link on wikitext and prevent other namespaces from polluting the suggestions.

I've added a configuration variable to configure that, and changed the default behavior to suggest pages from the main namespace by default. Besides, you'll still get suggestions from other namespaces if you explicitly type the namespace.

That should work for our needs. Will this patch be backported to the 1.31-compatible branch of the extension as well, or will we have to manually apply it ourselves? (Or am I misunderstanding how this whole thing works, either for extensions in general or this extension in particular?)

Change 657422 merged by jenkins-bot:
[mediawiki/extensions/LinkSuggest@master] Add a configuration variable for namespaces to suggest pages from

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

Code merged, and documentation updated!