{"action":"opened","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/6703","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-framework","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/6703/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/6703/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/6703/events","html_url":"https://github.com/silverstripe/silverstripe-framework/issues/6703","id":214229591,"number":6703,"title":"Debugging comments in SS templates not working correctly with empty includes","user":{"login":"michalkleiner","id":233342,"avatar_url":"https://avatars0.githubusercontent.com/u/233342?v=3","gravatar_id":"","url":"https://api.github.com/users/michalkleiner","html_url":"https://github.com/michalkleiner","followers_url":"https://api.github.com/users/michalkleiner/followers","following_url":"https://api.github.com/users/michalkleiner/following{/other_user}","gists_url":"https://api.github.com/users/michalkleiner/gists{/gist_id}","starred_url":"https://api.github.com/users/michalkleiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalkleiner/subscriptions","organizations_url":"https://api.github.com/users/michalkleiner/orgs","repos_url":"https://api.github.com/users/michalkleiner/repos","events_url":"https://api.github.com/users/michalkleiner/events{/privacy}","received_events_url":"https://api.github.com/users/michalkleiner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-14T22:47:34Z","updated_at":"2017-03-14T22:47:34Z","closed_at":null,"body":"The issue is with SSTemplateParser with source_file_comments turned on, when an empty template is included.\r\n\r\nBecause of https://github.com/silverstripe/silverstripe-framework/blob/3.5/view/SSTemplateParser.php#L4714, such template is not passed through the compiler, resulting in a lack of the PHP markup. \r\n\r\nThe method adding the debugging comments then adds the closing debugging comment regardless (https://github.com/silverstripe/silverstripe-framework/blob/3.5/view/SSTemplateParser.php#L4774), which gets passed to the output as it can't be interpreted.\r\n\r\nI'd say it'd better if the debugging comments worked the same way for empty templates as well, sometimes it's good to prepare the structured with empty templates and implement them after that, without having to think about putting at least an HTML or SS comment in to get passed via the compiler."}}
{"actor":{"display_login":"michalkleiner"}}