Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Terms and Privacy pages are empty #1372

Closed
vladikoff opened this issue Jul 9, 2014 · 21 comments · Fixed by #1376
Closed

Terms and Privacy pages are empty #1372

vladikoff opened this issue Jul 9, 2014 · 21 comments · Fixed by #1376
Assignees

Comments

@vladikoff
Copy link
Contributor

{"version":"0.16.1",
"commit":"a586a1891ef697dc69a71d1e74f42a5e59b8e8ad",
"l10n":"d29c280eff","tosPp":"c321fc714a"}

image

@jrgm
Copy link
Contributor

jrgm commented Jul 9, 2014

This works

curl 'http://127.0.0.1:3030/en-US/legal/privacy' -H 'Host: 127.0.0.1:3030' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0' -H 'Accept: text/partial, */*; q=0.01' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'X-Requested-With: XMLHttpRequest' -H 'Referer: http://127.0.0.1:3030/legal/privacy' -H 'Connection: keep-alive'

This has no actual content:

curl 'http://127.0.0.1:3030/en-us/legal/privacy' -H 'Host: 127.0.0.1:3030' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive'

@pdehaan
Copy link
Contributor

pdehaan commented Jul 9, 2014

@vladikoff Were you hitting the legal pages directly?

https://accounts.firefox.com/legal/terms (or the localed version: https://accounts.firefox.com/en-us/legal/terms) are blank for me, although this is working for me if I went to https://accounts.firefox.com/signup and then click on the ToS or PP links.

@pdehaan pdehaan added i18n and removed i18n labels Jul 9, 2014
@shane-tomlinson
Copy link

I believe this is a dup. Digging in. The problem is the en-us part, we do not allow for that.

@shane-tomlinson
Copy link

The problem is the en-us part, we do not allow for that.

Huh, the route's path is route.path = /^\/(?:([a-zA-Z-\_]*)\/)?legal\/(terms|privacy)(?:\/)?$/

@shane-tomlinson
Copy link

ahhhhhhhh, en-us vs en-US?

@shane-tomlinson
Copy link

wait, @vladikoff - what OS are you working in, and if OSX, is your partition set up to use a case-sensitive file system? I receive text using en-us or en-US as the locale, but my partition is case insensitive.

@pdehaan
Copy link
Contributor

pdehaan commented Jul 9, 2014

FWIW, I'm testing on https://latest.dev.lcip.org/ and it works if I navigate to this page through /signup but not if I go to https://latest.dev.lcip.org/en-us/legal/terms directly (or refresh the TOS/PP pages).

@shane-tomlinson
Copy link

@pdehaan - strange, locally everything is great. I wonder if this is either a case sensitivity or an incorrect normalization problem.

@jrgm
Copy link
Contributor

jrgm commented Jul 9, 2014

git bisect points to 46dedd0 as the first bad commit.

@shane-tomlinson
Copy link

@jrgm - you need to teach me how to use bisect.

@pdehaan
Copy link
Contributor

pdehaan commented Jul 9, 2014

@shane-tomlinson, I don't understand case sensitivity. It works if I navigate to the page but not if I refresh a page. Not sure how the case would be different in those cases to trigger an issue.

I also don't think I'm understanding the Network tab results in the FF/Chrome developer tools, since it looks like if I go to https://latest.dev.lcip.org/en-us/legal/terms directly it doesn't attempt to load the /config or client.json or the legal partials.

@jrgm
Copy link
Contributor

jrgm commented Jul 9, 2014

@shane-tomlinson - happy to talk bisect at any time (except 10am London time).

@pdehaan
Copy link
Contributor

pdehaan commented Jul 9, 2014

comptes_firefox__politique_de_confidentialit
Figure 1. My locale is set to French (fr), but I'm guessing it cannot find any translated French legal pages so it's falling back to our friendly en-us files (hence the URL).

But the screenshot does show that it's loading the outer "privacy" shell, our fingerprinted french.css file, a Firefox logo, and then the 6 font files (~190 KB).

@shane-tomlinson
Copy link

In the privacy.html src template, {{{ body }}} is being replaced by empty text.

@zaach
Copy link
Contributor

zaach commented Jul 9, 2014

@shane-tomlinson yep, when the accept header is text/html the template is not being filled in correctly.

@zaach
Copy link
Contributor

zaach commented Jul 9, 2014

The template variable shows the correct content, but isn't being found by the handlebars renderer.

@shane-tomlinson
Copy link

@zaach - the {{{ body }}} text isn't even present in the dist resources. Is it being stripped out during the compilation step?

from dist/en_US/privacy.html:

            <article id="legal-copy">

            </article>

Without the {{{ body }}} tag, the final rendering can't replace any text. :/

@zaach
Copy link
Contributor

zaach commented Jul 9, 2014

@shane-tomlinson aha, yeah just noticed that.

@shane-tomlinson
Copy link

@jrgm, @pdehaan, @vladikoff and @zaach all rock.

@zaach
Copy link
Contributor

zaach commented Jul 9, 2014

We need to fill in the ToS/PP content during the l10n-generate-pages grunt task. It's generated statically rather than dynamically now.

@pdehaan
Copy link
Contributor

pdehaan commented Jul 9, 2014

@shane-tomlinson:
YAY US

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants