{"action":"created","issue":{"url":"https://api.github.com/repos/contao/contao/issues/214","repository_url":"https://api.github.com/repos/contao/contao","labels_url":"https://api.github.com/repos/contao/contao/issues/214/labels{/name}","comments_url":"https://api.github.com/repos/contao/contao/issues/214/comments","events_url":"https://api.github.com/repos/contao/contao/issues/214/events","html_url":"https://github.com/contao/contao/issues/214","id":387350466,"node_id":"MDU6SXNzdWUzODczNTA0NjY=","number":214,"title":"Form is rendered twice","user":{"login":"dmolineus","id":1186266,"node_id":"MDQ6VXNlcjExODYyNjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1186266?v=4","gravatar_id":"","url":"https://api.github.com/users/dmolineus","html_url":"https://github.com/dmolineus","followers_url":"https://api.github.com/users/dmolineus/followers","following_url":"https://api.github.com/users/dmolineus/following{/other_user}","gists_url":"https://api.github.com/users/dmolineus/gists{/gist_id}","starred_url":"https://api.github.com/users/dmolineus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmolineus/subscriptions","organizations_url":"https://api.github.com/users/dmolineus/orgs","repos_url":"https://api.github.com/users/dmolineus/repos","events_url":"https://api.github.com/users/dmolineus/events{/privacy}","received_events_url":"https://api.github.com/users/dmolineus/received_events","type":"User","site_admin":false},"labels":[{"id":1028270354,"node_id":"MDU6TGFiZWwxMDI4MjcwMzU0","url":"https://api.github.com/repos/contao/contao/labels/defect","name":"defect","color":"bd2c00","default":false}],"state":"closed","locked":false,"assignee":{"login":"leofeyer","id":1192057,"node_id":"MDQ6VXNlcjExOTIwNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192057?v=4","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"leofeyer","id":1192057,"node_id":"MDQ6VXNlcjExOTIwNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192057?v=4","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/contao/contao/milestones/22","html_url":"https://github.com/contao/contao/milestone/22","labels_url":"https://api.github.com/repos/contao/contao/milestones/22/labels","id":3912041,"node_id":"MDk6TWlsZXN0b25lMzkxMjA0MQ==","number":22,"title":"4.4.32","description":"","creator":{"login":"leofeyer","id":1192057,"node_id":"MDQ6VXNlcjExOTIwNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192057?v=4","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2018-12-19T07:44:54Z","updated_at":"2018-12-19T08:30:14Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-12-04T15:47:32Z","updated_at":"2018-12-19T08:30:13Z","closed_at":"2018-12-19T08:30:13Z","author_association":"CONTRIBUTOR","body":"**Affected version(s)**\r\n\r\nTests in Contao 4.6, but probably 4.4 will be also affected.\r\n\r\n**Description**  \r\n\r\nI stumpled upon an issue that a `parseTemplate` hook, which should listen to the `form_wrapper` template got called twice, I realised that the form template is parsed twice.\r\n\r\n*Rendered in the hybrid*\r\nhttps://github.com/contao/contao/blob/10ba74288a43fef2dadd37e970130d2ce4dd35ed/core-bundle/src/Resources/contao/classes/Hybrid.php#L259\r\n\r\n*Rendered also in the compile method even though the return value is ignored.*\r\n\r\nhttps://github.com/contao/contao/blob/10ba74288a43fef2dadd37e970130d2ce4dd35ed/core-bundle/src/Resources/contao/classes/Hybrid.php#L236\r\n\r\nhttps://github.com/contao/contao/blob/10ba74288a43fef2dadd37e970130d2ce4dd35ed/core-bundle/src/Resources/contao/forms/Form.php#L298\r\n\r\nI guess that the form template shouldn't be parsed in the `compile()` method. I however don't know if you consider it a BC break removing it, as the docs says it would return a string.\r\n\r\n**How to reproduce**  \r\n\r\n1. Create a form\r\n2. Create a `parseTemplate` hook which manipulates only the `form_wrapper` template\r\n3. Submit the form with an error so that no redirect happens\r\n4. The `parseTemplate` hook is called twice\r\n\r\n/cc @frontendschlampe "},"comment":{"url":"https://api.github.com/repos/contao/contao/issues/comments/448510547","html_url":"https://github.com/contao/contao/issues/214#issuecomment-448510547","issue_url":"https://api.github.com/repos/contao/contao/issues/214","id":448510547,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODUxMDU0Nw==","user":{"login":"leofeyer","id":1192057,"node_id":"MDQ6VXNlcjExOTIwNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1192057?v=4","gravatar_id":"","url":"https://api.github.com/users/leofeyer","html_url":"https://github.com/leofeyer","followers_url":"https://api.github.com/users/leofeyer/followers","following_url":"https://api.github.com/users/leofeyer/following{/other_user}","gists_url":"https://api.github.com/users/leofeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/leofeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leofeyer/subscriptions","organizations_url":"https://api.github.com/users/leofeyer/orgs","repos_url":"https://api.github.com/users/leofeyer/repos","events_url":"https://api.github.com/users/leofeyer/events{/privacy}","received_events_url":"https://api.github.com/users/leofeyer/received_events","type":"User","site_admin":false},"created_at":"2018-12-19T08:30:13Z","updated_at":"2018-12-19T08:30:13Z","author_association":"MEMBER","body":"Fixed in 224ba0917c7f4f9478bd810b17ad4193213cf8d1."}}
{"actor":{"display_login":"leofeyer"}}