{"action":"created","issue":{"url":"https://api.github.com/repos/sulu/sulu/issues/2977","repository_url":"https://api.github.com/repos/sulu/sulu","labels_url":"https://api.github.com/repos/sulu/sulu/issues/2977/labels{/name}","comments_url":"https://api.github.com/repos/sulu/sulu/issues/2977/comments","events_url":"https://api.github.com/repos/sulu/sulu/issues/2977/events","html_url":"https://github.com/sulu/sulu/pull/2977","id":182326875,"number":2977,"title":"Fix sulu.loadUserSettings() when key does not exist","user":{"login":"rupkoe","id":7406696,"avatar_url":"https://avatars.githubusercontent.com/u/7406696?v=3","gravatar_id":"","url":"https://api.github.com/users/rupkoe","html_url":"https://github.com/rupkoe","followers_url":"https://api.github.com/users/rupkoe/followers","following_url":"https://api.github.com/users/rupkoe/following{/other_user}","gists_url":"https://api.github.com/users/rupkoe/gists{/gist_id}","starred_url":"https://api.github.com/users/rupkoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rupkoe/subscriptions","organizations_url":"https://api.github.com/users/rupkoe/orgs","repos_url":"https://api.github.com/users/rupkoe/repos","events_url":"https://api.github.com/users/rupkoe/events{/privacy}","received_events_url":"https://api.github.com/users/rupkoe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-11T17:36:57Z","updated_at":"2016-10-12T06:51:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sulu/sulu/pulls/2977","html_url":"https://github.com/sulu/sulu/pull/2977","diff_url":"https://github.com/sulu/sulu/pull/2977.diff","patch_url":"https://github.com/sulu/sulu/pull/2977.patch"},"body":"| Q | A\r\n| --- | ---\r\n| Bug fix? | yes\r\n| New feature? | no\r\n| BC breaks? | no\r\n| Deprecations? | no\r\n| Fixed tickets | -\r\n| Related issues/PRs | -\r\n| License | MIT\r\n| Documentation PR | -\r\n\r\n#### What's in this PR?\r\n\r\nFix for sulu-extionsion.js / sulu.loadUserSetting() method.\r\n\r\n#### Why?\r\n\r\nAs (partially) discussed with @danrot in https://sulu-io.slack.com/archives/general/p1476195014001682 \r\n\r\nFixes two problems occurring when trying to get a user setting, which does not exist yet in the DB (and also is not in the dynamic settings in the sandbox):\r\n\r\n1. Wrong call to log method.\r\n\r\n2. Callback is not called when key does not exist in neither sandbox nor DB. This gives a hard time when trying to use method in promises (like with the loadComponentData hook). Looking at the sulu.getUserSetting() method, returning NULL in case of a none-existent key seems to be consistent behavior.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sulu/sulu/issues/comments/253133606","html_url":"https://github.com/sulu/sulu/pull/2977#issuecomment-253133606","issue_url":"https://api.github.com/repos/sulu/sulu/issues/2977","id":253133606,"user":{"login":"danrot","id":405874,"avatar_url":"https://avatars.githubusercontent.com/u/405874?v=3","gravatar_id":"","url":"https://api.github.com/users/danrot","html_url":"https://github.com/danrot","followers_url":"https://api.github.com/users/danrot/followers","following_url":"https://api.github.com/users/danrot/following{/other_user}","gists_url":"https://api.github.com/users/danrot/gists{/gist_id}","starred_url":"https://api.github.com/users/danrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrot/subscriptions","organizations_url":"https://api.github.com/users/danrot/orgs","repos_url":"https://api.github.com/users/danrot/repos","events_url":"https://api.github.com/users/danrot/events{/privacy}","received_events_url":"https://api.github.com/users/danrot/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T06:51:59Z","updated_at":"2016-10-12T06:51:59Z","body":"A line in the changelog is missing. Please have a look at the others and add one."}}
{"actor":{"display_login":"danrot"}}