{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/13590","labels_url":"https://api.github.com/repos/symfony/symfony/issues/13590/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/13590/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/13590/events","html_url":"https://github.com/symfony/symfony/issues/13590","id":56523240,"number":13590,"title":"Twig render problem with form use name \"time\" in FormType","user":{"login":"andrewsmm","id":10296451,"avatar_url":"https://avatars.githubusercontent.com/u/10296451?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewsmm","html_url":"https://github.com/andrewsmm","followers_url":"https://api.github.com/users/andrewsmm/followers","following_url":"https://api.github.com/users/andrewsmm/following{/other_user}","gists_url":"https://api.github.com/users/andrewsmm/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewsmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewsmm/subscriptions","organizations_url":"https://api.github.com/users/andrewsmm/orgs","repos_url":"https://api.github.com/users/andrewsmm/repos","events_url":"https://api.github.com/users/andrewsmm/events{/privacy}","received_events_url":"https://api.github.com/users/andrewsmm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-04T12:59:14Z","updated_at":"2015-02-04T13:06:28Z","closed_at":"2015-02-04T13:06:28Z","body":"\r\n\r\nI use twig in Symfony 2.6.5. I created a FormType and set in public function getName(){ return \"time\" }\r\nand get next error when render form(form):\r\nVariable \"widget\" does not exist in form_div_layout.html.twig at line 123\r\n\r\n```\r\n{% block time_widget -%}\r\n    {% if widget == 'single_text' %}\r\n        {{- block('form_widget_simple') -}}\r\n    {% else -%}\r\n        {% set vars = widget == 'text' ? { 'attr': { 'size': 1 }} : {} %}\r\n        <div {{ block('widget_container_attributes') }}>\r\n            {{ form_widget(form.hour, vars) }}{% if with_minutes %}:{{ form_widget(form.minute, vars) }}{% endif %}{% if with_seconds %}:{{ form_widget(form.second, vars) }}{% endif %}\r\n        </div>\r\n    {%- endif %}\r\n{%- endblock time_widget %}\r\n```\r\n\r\nIf i use any other name this problem resolve.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/72851045","html_url":"https://github.com/symfony/symfony/issues/13590#issuecomment-72851045","issue_url":"https://api.github.com/repos/symfony/symfony/issues/13590","id":72851045,"user":{"login":"jakzal","id":190447,"avatar_url":"https://avatars.githubusercontent.com/u/190447?v=3","gravatar_id":"","url":"https://api.github.com/users/jakzal","html_url":"https://github.com/jakzal","followers_url":"https://api.github.com/users/jakzal/followers","following_url":"https://api.github.com/users/jakzal/following{/other_user}","gists_url":"https://api.github.com/users/jakzal/gists{/gist_id}","starred_url":"https://api.github.com/users/jakzal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakzal/subscriptions","organizations_url":"https://api.github.com/users/jakzal/orgs","repos_url":"https://api.github.com/users/jakzal/repos","events_url":"https://api.github.com/users/jakzal/events{/privacy}","received_events_url":"https://api.github.com/users/jakzal/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T13:06:28Z","updated_at":"2015-02-04T13:06:28Z","body":"This happens because the `time` name is already taken by the `TimeType`. As mentioned in [the documentation](http://symfony.com/doc/current/book/forms.html#creating-form-classes): \r\n\r\n> note that the getName() method should return a unique identifier for this form \"type\"\r\n\r\nIn other words, choose a different name for your form. Using a prefix for your form names will make it less likely you'll get a name clash.\r\n"}}