{"action":"created","issue":{"url":"https://api.github.com/repos/oppia/oppia/issues/4756","repository_url":"https://api.github.com/repos/oppia/oppia","labels_url":"https://api.github.com/repos/oppia/oppia/issues/4756/labels{/name}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/4756/comments","events_url":"https://api.github.com/repos/oppia/oppia/issues/4756/events","html_url":"https://github.com/oppia/oppia/issues/4756","id":301286369,"number":4756,"title":"Site-wide translations are breaking in exploration/collection views due to duplicate cookie keys.","user":{"login":"tjiang11","id":11807091,"avatar_url":"https://avatars2.githubusercontent.com/u/11807091?v=4","gravatar_id":"","url":"https://api.github.com/users/tjiang11","html_url":"https://github.com/tjiang11","followers_url":"https://api.github.com/users/tjiang11/followers","following_url":"https://api.github.com/users/tjiang11/following{/other_user}","gists_url":"https://api.github.com/users/tjiang11/gists{/gist_id}","starred_url":"https://api.github.com/users/tjiang11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjiang11/subscriptions","organizations_url":"https://api.github.com/users/tjiang11/orgs","repos_url":"https://api.github.com/users/tjiang11/repos","events_url":"https://api.github.com/users/tjiang11/events{/privacy}","received_events_url":"https://api.github.com/users/tjiang11/received_events","type":"User","site_admin":false},"labels":[{"id":383795018,"url":"https://api.github.com/repos/oppia/oppia/labels/frontend","name":"frontend","color":"d4c5f9","default":false},{"id":309197616,"url":"https://api.github.com/repos/oppia/oppia/labels/needs%20debugging","name":"needs debugging","color":"efffaf","default":false},{"id":528246808,"url":"https://api.github.com/repos/oppia/oppia/labels/talk-to:%20@tjiang11","name":"talk-to: @tjiang11","color":"eeeeee","default":false}],"state":"open","locked":false,"assignee":{"login":"DubeySandeep","id":16653571,"avatar_url":"https://avatars0.githubusercontent.com/u/16653571?v=4","gravatar_id":"","url":"https://api.github.com/users/DubeySandeep","html_url":"https://github.com/DubeySandeep","followers_url":"https://api.github.com/users/DubeySandeep/followers","following_url":"https://api.github.com/users/DubeySandeep/following{/other_user}","gists_url":"https://api.github.com/users/DubeySandeep/gists{/gist_id}","starred_url":"https://api.github.com/users/DubeySandeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DubeySandeep/subscriptions","organizations_url":"https://api.github.com/users/DubeySandeep/orgs","repos_url":"https://api.github.com/users/DubeySandeep/repos","events_url":"https://api.github.com/users/DubeySandeep/events{/privacy}","received_events_url":"https://api.github.com/users/DubeySandeep/received_events","type":"User","site_admin":false},"assignees":[{"login":"DubeySandeep","id":16653571,"avatar_url":"https://avatars0.githubusercontent.com/u/16653571?v=4","gravatar_id":"","url":"https://api.github.com/users/DubeySandeep","html_url":"https://github.com/DubeySandeep","followers_url":"https://api.github.com/users/DubeySandeep/followers","following_url":"https://api.github.com/users/DubeySandeep/following{/other_user}","gists_url":"https://api.github.com/users/DubeySandeep/gists{/gist_id}","starred_url":"https://api.github.com/users/DubeySandeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DubeySandeep/subscriptions","organizations_url":"https://api.github.com/users/DubeySandeep/orgs","repos_url":"https://api.github.com/users/DubeySandeep/repos","events_url":"https://api.github.com/users/DubeySandeep/events{/privacy}","received_events_url":"https://api.github.com/users/DubeySandeep/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-03-01T05:53:21Z","updated_at":"2018-04-02T19:30:43Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Reproduction steps (Note it doesn't seem to always be consistent):\r\n1. Login as admin\r\n2. Load welcome_to_collections.yaml from the admin page\r\n3. Go back to the library and logout / use Oppia as a guest\r\n4. Change the language to Dutch\r\n5. Go to /collection/0\r\n6. Notice the language is still in English. Inspect the console and type `document.cookie` and notice duplicate keys for NG_TRANSLATE_LANG_KEY. If the language is actually dutch, then try switching to a third language and returning to /collection/0. The language will likely not be updated, and the duplicate cookies will differ.\r\n\r\nExpected behavior: There should not be duplicate cookies for NG_TRANSLATE_LANG_KEY. The site language should be consistent.\r\n\r\nObserved behavior: There are duplicate cookie keys in the learner and collection view, it looks like this:\r\n`\"NG_TRANSLATE_LANG_KEY=%22de%22; NG_TRANSLATE_LANG_KEY=%22en%22\"`\r\n"},"comment":{"url":"https://api.github.com/repos/oppia/oppia/issues/comments/378019443","html_url":"https://github.com/oppia/oppia/issues/4756#issuecomment-378019443","issue_url":"https://api.github.com/repos/oppia/oppia/issues/4756","id":378019443,"user":{"login":"DubeySandeep","id":16653571,"avatar_url":"https://avatars0.githubusercontent.com/u/16653571?v=4","gravatar_id":"","url":"https://api.github.com/users/DubeySandeep","html_url":"https://github.com/DubeySandeep","followers_url":"https://api.github.com/users/DubeySandeep/followers","following_url":"https://api.github.com/users/DubeySandeep/following{/other_user}","gists_url":"https://api.github.com/users/DubeySandeep/gists{/gist_id}","starred_url":"https://api.github.com/users/DubeySandeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DubeySandeep/subscriptions","organizations_url":"https://api.github.com/users/DubeySandeep/orgs","repos_url":"https://api.github.com/users/DubeySandeep/repos","events_url":"https://api.github.com/users/DubeySandeep/events{/privacy}","received_events_url":"https://api.github.com/users/DubeySandeep/received_events","type":"User","site_admin":false},"created_at":"2018-04-02T19:30:43Z","updated_at":"2018-04-02T19:30:43Z","author_association":"MEMBER","body":"If we will make $cookies default path \"/\" then it will resolve the issue for new guest users but the guest users who already have cookies for /collection path in their browser they will still face the issue as because of $cookies.get will use /collection path cookies first then it'll move to \"/\" and there is no way to make a get request with path attribute in $cookies. So to resolve this issue we have to use JQuery (as we can make get request  with path attribute in JQuery)\r\n\r\nAnother workaround will be to remove the  `NG_TRANSLATE_LANG_KEY` from other paths ($cookies.remove can have path attribute), but this doesn't seem good to me."}}
{"actor":{"display_login":"DubeySandeep"}}