{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/7349","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7349/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7349/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7349/events","html_url":"https://github.com/joomla/joomla-cms/issues/7349","id":93261759,"number":7349,"title":"Protostar - Error page lacks needed elements in the head","user":{"login":"smz","id":552475,"avatar_url":"https://avatars.githubusercontent.com/u/552475?v=3","gravatar_id":"","url":"https://api.github.com/users/smz","html_url":"https://github.com/smz","followers_url":"https://api.github.com/users/smz/followers","following_url":"https://api.github.com/users/smz/following{/other_user}","gists_url":"https://api.github.com/users/smz/gists{/gist_id}","starred_url":"https://api.github.com/users/smz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smz/subscriptions","organizations_url":"https://api.github.com/users/smz/orgs","repos_url":"https://api.github.com/users/smz/repos","events_url":"https://api.github.com/users/smz/events{/privacy}","received_events_url":"https://api.github.com/users/smz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/No%20Code%20Attached%20Yet","name":"No Code Attached Yet","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-06T11:58:38Z","updated_at":"2015-07-06T12:54:11Z","closed_at":null,"body":"### Steps to reproduce the issue\r\n- Create a multilingual site and publish the language switcher\r\n- Enable \"Smart Search\" functionality and publish the \"Smart Search\" module in the \"Search\" position\r\n- Navigate to a non-existing page (*e.g.: the proverbial /foobar*)\r\n\r\n### Expected result\r\n- The Language Switcher should be correctly displayed\r\n- Smart Search should be fully operational (*i.e: suggestions should work*)\r\n\r\n### Actual result\r\n- The Language Switcher is un-styled\r\n- Smart Search suggestions do not work\r\n\r\n\r\n#### Additional comments\r\nThis is due to the lack of the `<jdoc:include type=\"head\" />` directive in Protostar `error.php` and hence the lack of various CSS and JS dependencies.\r\n\r\nUnhappily using `<jdoc:include type=\"head\" />` in error.php seems to be impossible, so I think we should either:\r\n- Do not publish any module in error.php\r\n- Find a way to have `<jdoc:include type=\"head\" />` (*or something equivalent...*) to work in error.php too"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/118845910","html_url":"https://github.com/joomla/joomla-cms/issues/7349#issuecomment-118845910","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7349","id":118845910,"user":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T12:54:11Z","updated_at":"2015-07-06T12:54:11Z","body":"Error pages are rendered by `JDocumentError` which is a different subclass than `JDocumentHTML`.  On one hand, IMO it is the right behavior that the actual document subclass doesn't have all the HTML features built into it; as an error handler that is referenced in a couple of places, it should be format agnostic and smart enough to try and kick back an error in the right format (JSON, XML, etc.).  On the other hand, when it does render an HTML document, it should be able to render a limited amount of data (I don't think there's a major issue with it being able to include `JDocumentRendererHead` but the way JDocument in general is coded, not so easy to do).\r\n\r\nI know that's not very helpful, but the long and short is Joomla's error handling (and the core itself) needs a major overhaul to support more than just HTML pages without hacky workarounds."}}