Closed Bug 1093297 Opened 11 years ago Closed 11 years ago

switching language settings or originating from non US IP results in incorrect tile view

Categories

(Content Services Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: edwong, Unassigned)

Details

I'm in France, 0. open new profile in nightly 1. set locale priority to 'fr' and 'en-US' second or lower 2. open new tab result: i see citizenfour tile i see this http request: https://tiles.services.mozilla.com/v2/links/view with {"locale":"en-US","tiles":[{"id":18},{"id":15},{"id":285},{"id":286},{"id":287},{"id":288},{"id":19},{"id":289},{},{}],"view":5}
Here's what the tiles from en-US and fr look like in curl requests: [0] 13:30 (ttys007) kthiessen@kthiessen-16107:~ 498$ curl -L -d '{"locale":"en-US"}' https://tiles.services.mozilla.com/v2/links/fetch; echo "" {"en-US": [{"bgColor": "", "directoryId": 18, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/208/51f5a7c3d309c57172bb0f9291c518a1bb8a5499.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/208/882fbbe03345aabd0017d9c870a2c467cb6178ec.png", "title": "Mozilla Community", "type": "affiliate", "url": "http://contribute.mozilla.org/"}, {"bgColor": "#ffffff", "directoryId": 15, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/214/7cb74a11f792a69cd78c1ff75f5b2798b0b7034a.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/214/ac37566804dfb4b85ea3d51ce9ddb99f7f7b5592.png", "title": "Firefox for Android", "type": "affiliate", "url": "https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dmozilla%26utm_medium%3Dbanner%26utm_campaign%3Ddesktop01"}, {"bgColor": "", "directoryId": 285, "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-US/285/5d5e1732697f27b599a6680de139fd7f09b8cff1.png", "title": "CITIZENFOUR", "type": "sponsored", "url": "https://citizenfourfilm.com/"}, {"bgColor": "", "directoryId": 286, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/215/cdc0fa69424a78153bf77c1d477a8947310ce412.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/215/7ffbc5244079e47334006e10e3403da3337064ca.png", "title": "Mozilla Manifesto", "type": "affiliate", "url": "https://www.mozilla.org/about/manifesto/"}, {"bgColor": "", "directoryId": 287, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-US/12/12ada6d5f17a9f361059cb7039c3539871fc797f.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-US/12/2d96c38c2969f5b183bdf22baff66292d0892a7c.png", "title": "Customize Firefox", "type": "affiliate", "url": "http://fastestfirefox.com/firefox/desktop/customize/"}, {"bgColor": "", "directoryId": 288, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/202/f981feeaa06339036595f573a96bfeb85f671261.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/202/9df2d6c27c84d8c03ea69e2ad89153ada16bc2c2.png", "title": "Mozilla Developer Network", "type": "affiliate", "url": "https://developer.mozilla.org/"}, {"bgColor": "", "directoryId": 19, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/209/c34029b40cbed79f11dc0b1af2f203ebea850f48.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-GB/209/addcd9302886923b9eb34f938052d9d6b86a2b7a.png", "title": "Firefox Marketplace", "type": "affiliate", "url": "https://marketplace.firefox.com/"}, {"bgColor": "#ffffff", "directoryId": 289, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-US/289/e0442567ca52bf84d5f1b38d62ded6b8a63e1e56.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/en-US/289/4fb3375ca7da5c4e1b4998dde4b5647b83767c05.png", "title": "Webmaker", "type": "affiliate", "url": "https://webmaker.org/?utm_source=directory-tiles&utm_medium=firefox-browser"}]} [0] 13:31 (ttys007) kthiessen@kthiessen-16107:~ 499$ curl -L -d '{"locale":"fr"}' https://tiles.services.mozilla.com/v2/links/fetch; echo "" {"fr": [{"bgColor": "", "directoryId": 121, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/121/52b76ab9def06925edaad4102e193e7cb38e426a.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/121/9d1d2571f05123a7e457d5e7283b34bebb0186f0.png", "title": "Communaut\u00e9 Mozilla", "type": "affiliate", "url": "http://contribute.mozilla.org/"}, {"bgColor": "", "directoryId": 122, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/ru/39/05b0054b1726e2fc34abcc54f7ffe335ba8bc71f.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/122/90e3be0b53a28df0a01d591f3ab067bd35d900b1.png", "title": "Firefox pour Android", "type": "affiliate", "url": "https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dmozilla%26utm_medium%3Dbanner%26utm_campaign%3Ddesktop01"}, {"bgColor": "#cae1f4", "directoryId": 115, "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/ru/40/9ee2b265678f2775de2e4bf680df600b502e6038.png", "title": "Any Country / fr", "type": "sponsored", "url": "https://www.mozilla.com/firefox/tiles"}, {"bgColor": "", "directoryId": 49, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/116/0a7e9fc4c9549abfff8a5b294ea47e26829ea881.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/ru/91/eec9d7b2259205cd72d05e9436940ad07ce0f320.png", "title": "Principes de Mozilla", "type": "affiliate", "url": "https://www.mozilla.org/about/manifesto/"}, {"bgColor": "", "directoryId": 117, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/50/31e897e23cd2fb3220865e4add897f7c1a969b1d.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/50/4fc4b93eb356b516bdc83d78897fcd8963054a43.png", "title": "Personnaliser Firefox", "type": "affiliate", "url": "http://fastestfirefox.com/firefox/desktop/customize/"}, {"bgColor": "", "directoryId": 51, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/126/7e900e2e9b8844bfd9facfdca2072ff62c055058.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/ru/43/41ddc78f5b998c468bfbca49a8f2b95268417de7.png", "title": "Mozilla Developer Network", "type": "affiliate", "url": "https://developer.mozilla.org"}, {"bgColor": "", "directoryId": 52, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/52/3bc8f0fadf458cde1ce18a88c55bce4ace240f79.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/ru/44/f38133afa01727952d06efc1eca19f31d95c67ec.png", "title": "Firefox Marketplace", "type": "affiliate", "url": "https://marketplace.firefox.com/"}, {"bgColor": "", "directoryId": 120, "enhancedImageURI": "https://dtex4kvbppovt.cloudfront.net/images/fr/120/242e50f01955cee930a7629f3c117934e2e130a2.png", "imageURI": "https://dtex4kvbppovt.cloudfront.net/images/ru/45/eb10f352cd04c1c084efd878cec8ecba049e981b.png", "title": "Mozilla Webmaker", "type": "affiliate", "url": "https://webmaker.org/"}]}
The problem in comment 0 looks like it's simply that the (client code?) that is deciding which locale from the list to send on to Tiles is picking the wrong one.
Ah! Per IRC: <blockquote> oyiptong: edwong-fr: we're not capturing accept-language, we're capturing the locale, which is a firefox chrome setting </blockquote> ... so you'd need to change the pref "general.useragent.locale" to "fr" in about:config to get the tiles for "fr." Marking this bug as INVALID, but as oyiptong says, we're tending toward Accept-Langage rather than chrome locale in the future, so this will be important down the line.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
We're treating the newtab page as chrome, so it's relying on the firefox or os locale. I believe the language priorities you're setting through preferences -> content -> languages is only for web content. If edwong does $ curl -L https://tiles.services.mozilla.com/v2/links/fetch/fr the result should have a tile with "France / fr" instead of "Any Country / fr" that kthiessen sees.
Product: Mozilla Services → Content Services
You need to log in before you can comment on or make changes to this bug.