Page MenuHomePhabricator

Notifications cannot be displayed from search result pages in mobile version
Closed, ResolvedPublicBUG REPORT

Description

I have recently encountered this strange phenomenon: whenever I am looking at search results (Special:Search, but only the results page), I cannot access the notifications by clicking/tapping on the bell icon. Nothing at all happens, no matter how often I try, with or without refreshing the page. It is no general Minerva problem, as it only happens on the mobile domain. And it works fine on the Special:Search page before entering a search term. Have tried it both in Chrome and in Safari, same behaviour. I also tried it on dewiki and enwiki, with and without advanced mobile contributions; always the same result.

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald Transcript
kostajh moved this task from Inbox to Needs Discussion on the Growth-Team board.
kostajh changed the subtype of this task from "Task" to "Bug Report".
kostajh subscribed.

Thanks for the report. I can confirm it's broken, e.g. https://en.m.wikipedia.org/w/index.php?search=leipzig&fulltext=search

mw.loader.getState( "ext.echo.ui" ) shows "ready", I haven't investigated beyond that.

The problem seems to come from this code in ext.cirrus.serp.js, originally added in T190010: JavaScript redirect shows irrelevant internal information in search page:

$( document ).on( 'click', 'a', function () {
		try {
			var clickUri = new mw.Uri( location.href );
			clickUri.query.searchToken = mw.config.get( 'wgCirrusSearchRequestSetToken' );
			history.replaceState( {}, '', clickUri.toString() );
		} catch ( e ) {
		}
	} );

Looks like a conflict between replaceState() in Cirrus and router.navigate (which is deprecated, we should use navigateTo) in Echo.

@Jdlrobson @ovasileva -- we believe this is caused by the Vue rewrite of the search widget or by Minerva v2, so we think your team would handle it best. Does that sound good?

@MMiller_WMF we haven't made any changes to the mobile version of search or Minerva so this is likely an issue that has existed for some time. I think the maintainers of the CirrusSearch extension would be the best people to tackle this one.

The Search Platform team does not have any frontend expertise anymore. Even if the code is in CirrusSearch, we'll need help to figure out what's going on and fix it. @kostajh / @Jdlrobson any chance you could help us with this?

Change 670295 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/CirrusSearch@master] CirrusSearch uses mediawiki.router

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

The Search Platform team does not have any frontend expertise anymore. Even if the code is in CirrusSearch, we'll need help to figure out what's going on and fix it. @kostajh / @Jdlrobson any chance you could help us with this?

The above patch will fix it but it will need a review. This code should not likely be running all links - only content inside the search results $content .

Change 670295 merged by jenkins-bot:
[mediawiki/extensions/CirrusSearch@master] CirrusSearch uses mediawiki.router

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

Who is QAing and resolving this ticket?