{"action":"created","issue":{"url":"https://api.github.com/repos/cargomedia/cm/issues/1908","labels_url":"https://api.github.com/repos/cargomedia/cm/issues/1908/labels{/name}","comments_url":"https://api.github.com/repos/cargomedia/cm/issues/1908/comments","events_url":"https://api.github.com/repos/cargomedia/cm/issues/1908/events","html_url":"https://github.com/cargomedia/cm/pull/1908","id":105834561,"number":1908,"title":"Layout.loadPage(): $pagePlaceholder might not be set","user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cargomedia/cm/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/cargomedia/cm/labels/ready","name":"ready","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2015-09-10T15:30:24Z","updated_at":"2015-10-06T19:42:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cargomedia/cm/pulls/1908","html_url":"https://github.com/cargomedia/cm/pull/1908","diff_url":"https://github.com/cargomedia/cm/pull/1908.diff","patch_url":"https://github.com/cargomedia/cm/pull/1908.patch"},"body":"In the error handling of `CM_Layout_Abstract`'s `loadPage()` we modify `_$pagePlaceholder`:\r\n```js\r\n        .catch(function(error) {\r\n          window.clearTimeout(layout._timeoutLoading);\r\n          if (!(error instanceof Promise.CancellationError)) {\r\n            layout._$pagePlaceholder.addClass('error').html('<pre>' + error.message + '</pre>');\r\n            layout._onPageError();\r\n            throw error;\r\n          }\r\n        });\r\n```\r\n\r\nThe problem is that `_$pagePlaceholder` might have been set to `null` in the `then()` block above, so this will fail.\r\n\r\n@vogdb could you look into this when you have some spare time? I have the feeling this code in general could use some love, it's quite difficult to read (e.g. logic spread between `loadPage` and `_loadPageThrottled`)."},"comment":{"url":"https://api.github.com/repos/cargomedia/cm/issues/comments/145975730","html_url":"https://github.com/cargomedia/cm/pull/1908#issuecomment-145975730","issue_url":"https://api.github.com/repos/cargomedia/cm/issues/1908","id":145975730,"user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T19:42:01Z","updated_at":"2015-10-06T19:42:01Z","body":"@njam please review"}}