Page MenuHomePhabricator

Error message displayed when Commons cannot access the database proposes users to search on Google
Closed, DuplicatePublic

Description

Error message displayed:

Cannot access the database: Cannot access the database: MySQL server has gone away (10.64.16.104)

And then:

You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.

Capture d’écran_2018-01-10_17-38-39.png (278×733 px, 37 KB)

./includes/exception/MWExceptionRenderer.php:			'You can try searching via Google in the meantime.'
./languages/i18n/en.json:	"dberr-usegoogle": "You can try searching via Google in the meantime.",

Event Timeline

It is unclear what this task is about and what the bug is.
Do you expect to not propose to search on Google? Something else?
("Expected behavior" welcome, assuming the task description describes the current behavior.)

If I'm correct, search on Google is not compatible with our usual privacy rules.

The usual message I see when a service is off is the Wikimedia error page. At least, have that page would be good for consistency.

zhuyifei1999 subscribed.

(This is not related to normal operation of Commons, nor it is something we have customized, hence removing tag)

I think I understand the desire to show the user something when there's an error like this, but the idea of hard-coding a reference to Google in Mediawiki core strikes me as a little like dunking a delicious cookie in water (pretty gross).

I would suggest this be removed. Or made configurable so that wiki owners could op-out of sending visitors to Google. If that's not desirable, may I suggest DuckDuckGo (duckduckgo.com/privacy) as a better alternative?

MWExceptionRenderer.php is where this bit of code lives if you're interested.