{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/36382981","id":36382981,"diff_hunk":"@@ -84,15 +84,18 @@ public function __construct(Repository $repository, RouterInterface $defaultRout\n     public function doGenerate($location, array $parameters)\n     {\n         $urlAliasService = $this->repository->getURLAliasService();\n-        if (isset($parameters['siteaccess'])) {\n+\n+        $siteaccess = isset($parameters['siteaccess']) ? $parameters['siteaccess'] : null;\n+        if ($siteaccess) {\n             // We generate for a different SiteAccess, so potentially in a different language.\n             $languages = $this->configResolver->getParameter('languages', null, $parameters['siteaccess']);\n             $urlAliases = $urlAliasService->listLocationAliases($location, false, null, null, $languages);\n             // Use the target SiteAccess root location\n-            $rootLocationId = $this->configResolver->getParameter('content.tree_root.location_id', null, $parameters['siteaccess']);\n+            $rootLocationId = $this->configResolver->getParameter('content.tree_root.location_id', null, $siteaccess);\n             unset($parameters['siteaccess']);\n         } else {\n             $rootLocationId = $this->rootLocationId;\n+            $languages - null;","path":"eZ/Publish/Core/MVC/Symfony/Routing/Generator/UrlAliasGenerator.php","position":17,"original_position":17,"commit_id":"87a0ee6fffae0ac35f82ec57985555a15a98b7af","original_commit_id":"87a0ee6fffae0ac35f82ec57985555a15a98b7af","user":{"login":"larseirik","id":332288,"avatar_url":"https://avatars.githubusercontent.com/u/332288?v=3","gravatar_id":"","url":"https://api.github.com/users/larseirik","html_url":"https://github.com/larseirik","followers_url":"https://api.github.com/users/larseirik/followers","following_url":"https://api.github.com/users/larseirik/following{/other_user}","gists_url":"https://api.github.com/users/larseirik/gists{/gist_id}","starred_url":"https://api.github.com/users/larseirik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larseirik/subscriptions","organizations_url":"https://api.github.com/users/larseirik/orgs","repos_url":"https://api.github.com/users/larseirik/repos","events_url":"https://api.github.com/users/larseirik/events{/privacy}","received_events_url":"https://api.github.com/users/larseirik/received_events","type":"User","site_admin":false},"body":"$languages=null i guess? Could be declared and moved before the if condition above i guess","created_at":"2015-08-06T05:51:29Z","updated_at":"2015-08-06T05:51:29Z","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1368#discussion_r36382981","pull_request_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments/36382981"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/1368#discussion_r36382981"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368","id":41737143,"html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1368","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1368.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1368.patch","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1368","number":1368,"state":"open","locked":false,"title":"Fix EZP-24686: Multisite cross SA links to different languages","user":{"login":"joaoinacio","id":1168342,"avatar_url":"https://avatars.githubusercontent.com/u/1168342?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoinacio","html_url":"https://github.com/joaoinacio","followers_url":"https://api.github.com/users/joaoinacio/followers","following_url":"https://api.github.com/users/joaoinacio/following{/other_user}","gists_url":"https://api.github.com/users/joaoinacio/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoinacio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoinacio/subscriptions","organizations_url":"https://api.github.com/users/joaoinacio/orgs","repos_url":"https://api.github.com/users/joaoinacio/repos","events_url":"https://api.github.com/users/joaoinacio/events{/privacy}","received_events_url":"https://api.github.com/users/joaoinacio/received_events","type":"User","site_admin":false},"body":"JIRA: https://jira.ez.no/browse/EZP-24686\r\n\r\n#### Problem:\r\nCross-siteaccess links using multisite (content tree root) do not work correctly when the target siteaccess has a root location in a different translation that of the current site.\r\n\r\nThe fix is to make sure to load the target SA root location's path with respect to its language list.","created_at":"2015-08-05T23:17:04Z","updated_at":"2015-08-06T05:51:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaa00fa9ab6055fe9893c7f4cdf0b7307bf296ff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368/commits","review_comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368/comments","review_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1368/comments","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/87a0ee6fffae0ac35f82ec57985555a15a98b7af","head":{"label":"joaoinacio:EZP-24686_multisite_language_links","ref":"EZP-24686_multisite_language_links","sha":"87a0ee6fffae0ac35f82ec57985555a15a98b7af","user":{"login":"joaoinacio","id":1168342,"avatar_url":"https://avatars.githubusercontent.com/u/1168342?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoinacio","html_url":"https://github.com/joaoinacio","followers_url":"https://api.github.com/users/joaoinacio/followers","following_url":"https://api.github.com/users/joaoinacio/following{/other_user}","gists_url":"https://api.github.com/users/joaoinacio/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoinacio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoinacio/subscriptions","organizations_url":"https://api.github.com/users/joaoinacio/orgs","repos_url":"https://api.github.com/users/joaoinacio/repos","events_url":"https://api.github.com/users/joaoinacio/events{/privacy}","received_events_url":"https://api.github.com/users/joaoinacio/received_events","type":"User","site_admin":false},"repo":{"id":6478972,"name":"ezpublish-kernel","full_name":"joaoinacio/ezpublish-kernel","owner":{"login":"joaoinacio","id":1168342,"avatar_url":"https://avatars.githubusercontent.com/u/1168342?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoinacio","html_url":"https://github.com/joaoinacio","followers_url":"https://api.github.com/users/joaoinacio/followers","following_url":"https://api.github.com/users/joaoinacio/following{/other_user}","gists_url":"https://api.github.com/users/joaoinacio/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoinacio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoinacio/subscriptions","organizations_url":"https://api.github.com/users/joaoinacio/orgs","repos_url":"https://api.github.com/users/joaoinacio/repos","events_url":"https://api.github.com/users/joaoinacio/events{/privacy}","received_events_url":"https://api.github.com/users/joaoinacio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joaoinacio/ezpublish-kernel","description":"","fork":true,"url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel","forks_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/joaoinacio/ezpublish-kernel/releases{/id}","created_at":"2012-10-31T18:46:04Z","updated_at":"2015-04-14T15:52:18Z","pushed_at":"2015-08-05T23:13:20Z","git_url":"git://github.com/joaoinacio/ezpublish-kernel.git","ssh_url":"git@github.com:joaoinacio/ezpublish-kernel.git","clone_url":"https://github.com/joaoinacio/ezpublish-kernel.git","svn_url":"https://github.com/joaoinacio/ezpublish-kernel","homepage":"","size":40330,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"b66e4fb6087faf95a4353467b961438bf0a76088","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":1663890,"name":"ezpublish-kernel","full_name":"ezsystems/ezpublish-kernel","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/ezpublish-kernel","description":"eZ Platform (aka eZ Publish 6.x) kernel","fork":false,"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","forks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/forks","keys_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/teams","hooks_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/events","assignees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/tags","blobs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/languages","stargazers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/subscription","commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/merges","archive_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/downloads","issues_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/releases{/id}","created_at":"2011-04-26T08:54:24Z","updated_at":"2015-07-09T16:57:39Z","pushed_at":"2015-08-05T23:17:04Z","git_url":"git://github.com/ezsystems/ezpublish-kernel.git","ssh_url":"git@github.com:ezsystems/ezpublish-kernel.git","clone_url":"https://github.com/ezsystems/ezpublish-kernel.git","svn_url":"https://github.com/ezsystems/ezpublish-kernel","homepage":"http://ez.no","size":62698,"stargazers_count":100,"watchers_count":100,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"open_issues_count":57,"forks":127,"open_issues":57,"watchers":100,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368"},"html":{"href":"https://github.com/ezsystems/ezpublish-kernel/pull/1368"},"issue":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1368"},"comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1368/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1368/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/ezpublish-kernel/statuses/87a0ee6fffae0ac35f82ec57985555a15a98b7af"}}}}