Page MenuHomePhabricator

Search suggests the Special:RunJobs page on all wikis, even though it's unlisted and not appropriate to suggest
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue :

  • On wikifunctions wmf.20 in the search field, enter Special:Run - two suggestions would be displayed: Special:RunFunction and Special:RunJobs
  • Click on Special:RunJobs - Bad Request Request must be POSTed. page will be displayed

Screen Shot 2024-03-01 at 5.26.03 PM.png (474×1 px, 47 KB)

https://www.wikifunctions.org/wiki/Special:RunJobs
Request Method: GET
Status Code:
400 Bad Request

What should have happened instead?:

  • if a request for page results in a bad request, the page should not be in the search suggestions list
  • bad requests (if possible) should be handled in more user-friendly way

Other information :

  • the suggestion Special:RunJobs exists on all wiki (lang wikis and non-lang wikis). What makes the issue more prominent on wikifuncitons is that there is Special:RunFuncitons page, so users have more chances to see Special:RunJobs page as a suggestion.
  • checked: non-existing Special pages are handled gracefully

Event Timeline

Gehel subscribed.

This does not seem to be related to Search, removing us from the ticket.

We should make it an unlisted special page.

Hmm, it's unlisted but it still shows up in Search? That does feel like a Search bug…

Jdforrester-WMF renamed this task from [wmf.20] Bad request for Special:RunJobs page to Search suggests the Special:RunJobs page even though it's unlisted.Mar 7 2024, 5:40 PM
Jdforrester-WMF renamed this task from Search suggests the Special:RunJobs page even though it's unlisted to Search suggests the Special:RunJobs page on all wikis, even though it's unlisted and not appropriate to suggest.Mar 7 2024, 5:43 PM
pfischer moved this task from Incoming to In Progress on the Discovery-Search (Current work) board.
pfischer set the point value for this task to 3.

Change 1010976 had a related patch set uploaded (by Peter Fischer; author: Peter Fischer):

[mediawiki/core@master] Hide unlisted special pages from search completion results

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

@Jdforrester-WMF, I looked at the code. The CirrusSearch SearchEngine does not handle Special:… searches itself, instead it delegates to the (core) implementation which in turn delegates to the default TitlePrefixSearch where searches inside NS_SPECIAL are processed in PrefixSearch::specialSearch( $search, $limit, $offset ). This performs an in-memory search against pages listed in SpecialPageFactory::CORE_LIST.

TL;DR This seems to be a core issue, but I created a patch nonetheless.

TL;DR This seems to be a core issue, but I created a patch nonetheless.

Aha, thanks. For future tasks, if your team isn't responsible for the core plumbing of search engines into MediaWiki, who is? The MediaWiki group?

Change 1011334 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Specials: Make fixed isListed() calls use inheritance

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

Change #1010976 merged by jenkins-bot:

[mediawiki/core@master] search: Exclude unlisted special pages from search completion

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

Change #1015434 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] search: Avoid user block/rights compute in SpecialPasswordReset->isListed

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

Change #1015434 merged by jenkins-bot:

[mediawiki/core@master] search: Avoid user block/rights compute in SpecialPasswordReset->isListed

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

Change #1011334 abandoned by Jforrester:

[mediawiki/core@master] Specials: Proved UnlistedFormSpecialPage and ListedRedirectSpecialPage

Reason:

Lack of interest.

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