{"action":"created","issue":{"url":"https://api.github.com/repos/backdrop-contrib/project_browser/issues/4","labels_url":"https://api.github.com/repos/backdrop-contrib/project_browser/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/backdrop-contrib/project_browser/issues/4/comments","events_url":"https://api.github.com/repos/backdrop-contrib/project_browser/issues/4/events","html_url":"https://github.com/backdrop-contrib/project_browser/issues/4","id":76248348,"number":4,"title":"json feed from project_browser_server","user":{"login":"Graham-72","id":10559274,"avatar_url":"https://avatars.githubusercontent.com/u/10559274?v=3","gravatar_id":"","url":"https://api.github.com/users/Graham-72","html_url":"https://github.com/Graham-72","followers_url":"https://api.github.com/users/Graham-72/followers","following_url":"https://api.github.com/users/Graham-72/following{/other_user}","gists_url":"https://api.github.com/users/Graham-72/gists{/gist_id}","starred_url":"https://api.github.com/users/Graham-72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graham-72/subscriptions","organizations_url":"https://api.github.com/users/Graham-72/orgs","repos_url":"https://api.github.com/users/Graham-72/repos","events_url":"https://api.github.com/users/Graham-72/events{/privacy}","received_events_url":"https://api.github.com/users/Graham-72/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T06:08:56Z","updated_at":"2015-05-14T06:23:41Z","closed_at":null,"body":"@docwilmot - I am trying to find a way of dealing with this in Backdrop and would appreciate any thoughts you may have.\r\n\r\nAt the moment, when the default_server URL is changed appropriately, project-browser gets its test data by using the URL\r\nhttp://www.mytestsite.net/project_browser/server/query/module/7?version=1&type=module&order_by=score&sort=desc&requested=10&page=0&method=query\r\n\r\nThis calls the following function within project_browser_server.module - line 76\r\n\r\n/**\r\n * Return some JSON or JSONP to the page.\r\n */\r\nfunction _project_browser_server_return($results) {\r\n  // JSONP\r\n  if (!empty($_GET['callback'])) {\r\n    // @todo msie9 might break with this content-type.\r\n    // @see http://stackoverflow.com/questions/111302/best-content-type-to-serve-jsonp/111306#111306\r\n    backdrop_add_http_header('Content-Type', 'application/javascript; charset=utf-8');\r\n    print $_GET['callback'] . '(' . backdrop_json_encode($results) . ');';\r\n  }\r\n  else {\r\n    backdrop_add_http_header('Content-Type', 'application/json; charset=utf-8');\r\n    print backdrop_json_encode($results);\r\n  }\r\n}\r\n\r\nIn Drupal this produces the json output and nothing else.\r\nIn Backdrop it produces the json output followed by the html for a page.\r\n\r\nI am wondering how to suppress the html which I assume is added by the layout system. Is it possible to bypass the layout system for specific paths? I would like to be able to choose 'no layout' where there is a choice of 1 column etc.\r\n\r\nAny suggestions would be much appreciated. My other inclination is to build a simple non-Backdrop server page just to generate the test data in json form so we can proceed with testing with Backdrop rather than Drupal data. \r\n\r\nI have just had a thought - as a temporary expedient I can use an installation of project_browser_server on a Drupal site and just modify the test data in pbs_example.module to get the right json data. But we will need it on Backdrop for the final system."},"comment":{"url":"https://api.github.com/repos/backdrop-contrib/project_browser/issues/comments/101934153","html_url":"https://github.com/backdrop-contrib/project_browser/issues/4#issuecomment-101934153","issue_url":"https://api.github.com/repos/backdrop-contrib/project_browser/issues/4","id":101934153,"user":{"login":"Graham-72","id":10559274,"avatar_url":"https://avatars.githubusercontent.com/u/10559274?v=3","gravatar_id":"","url":"https://api.github.com/users/Graham-72","html_url":"https://github.com/Graham-72","followers_url":"https://api.github.com/users/Graham-72/followers","following_url":"https://api.github.com/users/Graham-72/following{/other_user}","gists_url":"https://api.github.com/users/Graham-72/gists{/gist_id}","starred_url":"https://api.github.com/users/Graham-72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Graham-72/subscriptions","organizations_url":"https://api.github.com/users/Graham-72/orgs","repos_url":"https://api.github.com/users/Graham-72/repos","events_url":"https://api.github.com/users/Graham-72/events{/privacy}","received_events_url":"https://api.github.com/users/Graham-72/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T06:23:40Z","updated_at":"2015-05-14T06:23:40Z","body":"Thanks @kerasai I will do this.\r\n\r\nUnfortunately I am not at Drupalcon - I'm in UK."}}