Page MenuHomePhabricator

Lack of suggestions in searchbar for private wikis with Cosmos skin
Open, Needs TriagePublicBUG REPORT

Description

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

  • Have a private wiki (i.e. 'read' only accessible to certain users)
  • Enable and use the Cosmos skin
  • Attempt to type in the first few letters of an existing page in the search bar

What happens?:
No page suggestions appear

What should have happened instead?:
Suggested pages should have appeared (for example after typing 'Mai', 'Main Page' should have appeared)

Software version (skip for WMF-hosted wikis like Wikipedia):
Product Version
MediaWiki 1.40.2 (13bc5ff)
22:43, 30 January 2024
PHP 8.2.7 (fpm-fcgi)

Other information (browser name/version, screenshots, etc.):
Likely because the API gets disallowed when the wiki is private

Event Timeline

I'm not sure if this is a bug in MediaWiki or not but when on api.php, it seems to never consider you logged in (hacking MediaWiki adding $this->dieWithError( $user->getName() ) gives IP not logged in user name), therefore https://github.com/wikimedia/mediawiki/blob/da6b055c94d414009688cef1a6f435be8f1f5ede/includes/api/ApiMain.php#L1755 seems to never be true, unless the following check (isEveryoneAllowed( 'read' )) is true (meaning anonymous users (*) has read rights) therefore this is technically to be expected since MediaWiki doesn't seem to know the user has read rights from the API. This doesn't necessarily seem related to Cosmos and I am not sure if its intentional or not.