Page MenuHomePhabricator

Make CentralNotice banner completely believe it to be in a certain country
Closed, ResolvedPublic1 Estimated Story Points

Description

Using the following URL to test a CentralNotice banner how it is shown in French in France:
https://meta.wikimedia.org/w/index.php?title=Help:Help&banner=wlm_2015&uselang=fr&force=1&country=FR

The &country=FR component in the URL is there to test how a banner behaves in a certain country. However the URL in this banner links to the country I am currently located in (or the international website), and thus not showing the banner how it looks like (and links) in France. (People in France can reproduce this bug by using the country code NL instead, they should then NOT get the French website, but the Dutch.)

Please make it possible that the banner is shown in the way it actually is. This is the only way for CentralNotice admins to test if a banner works correctly.

I assume somewhere the system should fake an French IP address or something, instead of what it currently does.

Event Timeline

Romaine created this task.Sep 1 2015, 4:45 PM
Romaine raised the priority of this task from to High.
Romaine updated the task description. (Show Details)
Romaine added a subscriber: Romaine.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 1 2015, 4:45 PM
Pcoombe added a subscriber: Pcoombe.

For fundraising banners I use the following snippet:

if( mw.util.getParamValue("country") ) {
    Geo.country = mw.util.getParamValue("country");
}

However it would be nice if CentralNotice did this automatically.

awight added a subscriber: awight.
Pcoombe lowered the priority of this task from High to Medium.Apr 14 2016, 4:55 PM
Pcoombe added a project: Fundraising-Backlog.
Pcoombe set Security to None.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 8:27 PM
AndyRussG set the point value for this task to 1.Apr 19 2016, 8:29 PM
Jseddon lowered the priority of this task from Medium to Low.Aug 16 2016, 11:08 PM
mmodell removed a subscriber: awight.Jun 22 2017, 9:38 PM
Pcoombe closed this task as Resolved.Dec 22 2017, 4:39 PM
Pcoombe claimed this task.

You can now use mw.centralNotice.data.country in the banner code, instead of Geo.country. This will use the country parameter if it was specified in the URL, otherwise falling back to geolocation.