Page MenuHomePhabricator

Geolocation not available on wikimediafoundation.org
Closed, DeclinedPublic

Description

On most Wikimedia sites there is a JavaScript global variable 'Geo' which contains information on the client's location. However this variable does not seem to be loaded at all on wikimediafoundation.org. There are a couple of Fundraising things that it would be nice to have this for.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz71747

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:51 AM
bzimport set Reference to bz71747.
bzimport added a subscriber: Unknown Object (MLST).

Is it from CentralNotice?

'wmgUseCentralNotice' => array(
'advisorywiki' => false, Per Bug # 25519
'default' => true,
'fishbowl' => false,
Per bug 17718 Disable CentralNotice on private/fishbowl wikis
'fiwikimedia' => false, bug 17718
'metawiki' => true,
Central interface
'private' => false, :D
'qualitywiki' => false,
'testwiki' => true,
'ukwikimedia' => false,
Per bug 17718 Disable CentralNotice on private/fishbowl wikis
'simplewiki' => true,
),

Ah yes, it is CentralNotice which is loading it on the other wikis.

It seems that loading <script src="//bits.wikimedia.org/geoiplookup"> in the page head should be enough. Or we can just enable CentralNotice there if that's the easiest way.

(In reply to Peter Coombe from comment #2)

Ah yes, it is CentralNotice which is loading it on the other wikis.

It seems that loading <script src="//bits.wikimedia.org/geoiplookup"> in the
page head should be enough. Or we can just enable CentralNotice there if
that's the easiest way.

Presumably as long it doesn't have any unwanted side effects etc

See also T102848, but I'm not sure what the status of that is.

Which team would be responsible for handling this?

@Krenair: IMO ops should own geolocation. Fundraising Tech has been trying to push it out of the nest for a while now, as it involves Varnish and other op-ly fun.

@awight Any idea what's the best way to make this happen? It would be really helpful for the Store if we could add location dependent stuff to the Thank You page.

Pcoombe lowered the priority of this task from Medium to Low.Feb 15 2016, 2:52 PM

Actually scratch the above comment, T126814 is going to help us with the Thank You page. It might still be nice to get geolocation working for other pages though.

Per @Reedy, the reason the global isn't set is because CentralNotice is disabled on fishbowl wikis by default (which wikimediafoundation.org is).

'wmgUseCentralNotice' => [
	'default' => true,
	'advisorywiki' => false, // Per T27519
	'fishbowl' => false, // Per T19718 Disable CentralNotice on private/fishbowl wikis
	'loginwiki' => false, // T61702
	'nonglobal' => false,
	'fiwikimedia' => false, // T19718
	'private' => false, // :D
	'qualitywiki' => false,
	'votewiki' => false, // T61702
],

Either it should be enabled there, or moved to a separate extension that is (e.g. T102848).

Note by the way, now that geoiplookup no longer exists (T100902) and the cookie is set server-side by Varnish, it now applies to all responses from the text cluster, which includes fishbowl wikis.

wikimediafoundation.org pages could simply read the values directly from the cookie (without needing the actual geoIp.js from CentralNotice).

@atgo This task should be considered unblocked, given Geo cookies are now available to wikimediafoundation.org. I don't know if it's known how to use it exactly, but unless there is a specific use waiting for it, this could also be closed. The general 'making available' is done.

Varnent added a subscriber: Varnent.

No longer applies to new site.