{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/6684","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6684/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6684/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6684/events","html_url":"https://github.com/joomla/joomla-cms/pull/6684","id":66820547,"number":6684,"title":"Allow jdoc tags to be written with closing tags","user":{"login":"okonomiyaki3000","id":79470,"avatar_url":"https://avatars.githubusercontent.com/u/79470?v=3","gravatar_id":"","url":"https://api.github.com/users/okonomiyaki3000","html_url":"https://github.com/okonomiyaki3000","followers_url":"https://api.github.com/users/okonomiyaki3000/followers","following_url":"https://api.github.com/users/okonomiyaki3000/following{/other_user}","gists_url":"https://api.github.com/users/okonomiyaki3000/gists{/gist_id}","starred_url":"https://api.github.com/users/okonomiyaki3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonomiyaki3000/subscriptions","organizations_url":"https://api.github.com/users/okonomiyaki3000/orgs","repos_url":"https://api.github.com/users/okonomiyaki3000/repos","events_url":"https://api.github.com/users/okonomiyaki3000/events{/privacy}","received_events_url":"https://api.github.com/users/okonomiyaki3000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-07T08:20:40Z","updated_at":"2015-06-17T22:29:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/6684","html_url":"https://github.com/joomla/joomla-cms/pull/6684","diff_url":"https://github.com/joomla/joomla-cms/pull/6684.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/6684.patch"},"body":"## What?\r\nTypical `JDoc` tags are self closing, like this:\r\n```xml\r\n<jdoc:include blahblahblah />\r\n```\r\nWith this change, that will still work but now so will this:\r\n```xml\r\n<jdoc:include blahblahblah></jdoc:include>\r\n```\r\n\r\n## Why?\r\nPractically, it makes no difference but why shouldn't we be able to write these tags any way we like? \r\nOK, there are a couple of nice things about using a closing tag. \r\n1) If your IDE is 'helping' you by closing your tags, it might not recognize that `<jdoc:include />` is closed because HTML has a finite number of self-closing tags and `<jdoc:include />` is not among them. Therefore, an IDE that knows HTML well will probably see this tag as still open and try to help you close it. \r\n2) It's a bit silly but, you could do something like this:\r\n```xml\r\n<jdoc:include type=\"modules\" name=\"foo\">\r\n    This is the 'foo' module space, it will usually be used with 'bar' modules but sometimes may include 'baz' modules. \r\n</jdoc:include>\r\n```\r\nThe text inside the tag will essentially be a comment that will be miraculously stripped away when the template output is parsed. \r\n\r\n## How (to test)?\r\nWell, this is change to a single line of code. It's the line that parses `<jdoc:include>` tags in your template so to test the change: \r\n1) Load up any page of your site that uses `<jdoc:include />` (i.e. any page). If all of your modules, component, head, etc are loading, the existing functionality is not broken.\r\n2) In your template file, change those `<jdoc:include />` tags (some or all, it doesn't matter) to `<jdoc:include></jdoc:include>` and load the page again. Everything should continue to work exactly as usual. Then the new functionality is also not broken.\r\n3) Just for good measure, change those tags to `<jdoc:include /></jdoc:include>` and load the page. Now you should see that everything appears where it's expected but, in the HTML source of the page there will be some `</jdoc:include>` left behind in those places. This expected because that's not the right way to write these tags. So then, the change is working as it should.\r\n\r\n## WTF?\r\nI got some unit test failures with this change but I assure you, they are not related to this change. I will fix them in a different PR. Because they have nothing to do with this. At all.  "},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/112969799","html_url":"https://github.com/joomla/joomla-cms/pull/6684#issuecomment-112969799","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/6684","id":112969799,"user":{"login":"okonomiyaki3000","id":79470,"avatar_url":"https://avatars.githubusercontent.com/u/79470?v=3","gravatar_id":"","url":"https://api.github.com/users/okonomiyaki3000","html_url":"https://github.com/okonomiyaki3000","followers_url":"https://api.github.com/users/okonomiyaki3000/followers","following_url":"https://api.github.com/users/okonomiyaki3000/following{/other_user}","gists_url":"https://api.github.com/users/okonomiyaki3000/gists{/gist_id}","starred_url":"https://api.github.com/users/okonomiyaki3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonomiyaki3000/subscriptions","organizations_url":"https://api.github.com/users/okonomiyaki3000/orgs","repos_url":"https://api.github.com/users/okonomiyaki3000/repos","events_url":"https://api.github.com/users/okonomiyaki3000/events{/privacy}","received_events_url":"https://api.github.com/users/okonomiyaki3000/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T22:29:03Z","updated_at":"2015-06-17T22:29:03Z","body":"You've got a typo here: \"jodc\" instead of \"jdoc\". Could that be it?"}}