{"action":"created","issue":{"url":"https://api.github.com/repos/codemix/yii2-localeurls/issues/40","labels_url":"https://api.github.com/repos/codemix/yii2-localeurls/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/codemix/yii2-localeurls/issues/40/comments","events_url":"https://api.github.com/repos/codemix/yii2-localeurls/issues/40/events","html_url":"https://github.com/codemix/yii2-localeurls/issues/40","id":99922757,"number":40,"title":"infinite loop bug + solution","user":{"login":"xunlight","id":7010599,"avatar_url":"https://avatars.githubusercontent.com/u/7010599?v=3","gravatar_id":"","url":"https://api.github.com/users/xunlight","html_url":"https://github.com/xunlight","followers_url":"https://api.github.com/users/xunlight/followers","following_url":"https://api.github.com/users/xunlight/following{/other_user}","gists_url":"https://api.github.com/users/xunlight/gists{/gist_id}","starred_url":"https://api.github.com/users/xunlight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xunlight/subscriptions","organizations_url":"https://api.github.com/users/xunlight/orgs","repos_url":"https://api.github.com/users/xunlight/repos","events_url":"https://api.github.com/users/xunlight/events{/privacy}","received_events_url":"https://api.github.com/users/xunlight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-09T19:46:52Z","updated_at":"2015-08-11T20:54:22Z","closed_at":null,"body":"Firstly thank you very much for sharing your solution.\r\n\r\n\r\nI've got infinite redirect loop.\r\nYou can fix infinite loop by insert something like this on line 403\r\n```PHP\r\n        //don't redirect when we are on same page\r\n        if( $redirectUrl===$_SERVER['REQUEST_URI'] )\r\n            return;\r\n```\r\n (before redirect)\r\n```PHP\r\nYii::$app->getResponse()->redirect($redirectUrl);\r\n```"},"comment":{"url":"https://api.github.com/repos/codemix/yii2-localeurls/issues/comments/130069815","html_url":"https://github.com/codemix/yii2-localeurls/issues/40#issuecomment-130069815","issue_url":"https://api.github.com/repos/codemix/yii2-localeurls/issues/40","id":130069815,"user":{"login":"mikehaertl","id":675062,"avatar_url":"https://avatars.githubusercontent.com/u/675062?v=3","gravatar_id":"","url":"https://api.github.com/users/mikehaertl","html_url":"https://github.com/mikehaertl","followers_url":"https://api.github.com/users/mikehaertl/followers","following_url":"https://api.github.com/users/mikehaertl/following{/other_user}","gists_url":"https://api.github.com/users/mikehaertl/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehaertl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehaertl/subscriptions","organizations_url":"https://api.github.com/users/mikehaertl/orgs","repos_url":"https://api.github.com/users/mikehaertl/repos","events_url":"https://api.github.com/users/mikehaertl/events{/privacy}","received_events_url":"https://api.github.com/users/mikehaertl/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T20:54:22Z","updated_at":"2015-08-11T20:54:22Z","body":"> processLocaleUrl is for some reason called twice\r\n\r\nIs this during one request? Can't see, how this could happen. Are you sure, there's not maybe some AJAX requests involved, that send requests with different language code in the background or something?\r\n\r\nIt would really help, if you could provide a boiled down example setup, preferrably built on top of Yii's basic application template."}}