Guite / MostGenerator

Transformation cartridges for generating Symfony bundles from ModuleStudio models.
https://modulestudio.de
23 stars 2 forks source link

Unexpected token "name" of value "comment" #772

Closed robbrandt closed 8 years ago

robbrandt commented 8 years ago

`

                <option value="archive" title="{{ __('Move content into the archive.') }}">{{ __('Archive' comment='this is the verb, not the noun') }}</option>
                <option value="trash" title="{{ __('Move content into the recycle bin.') }}">{{ __('Trash' comment='this is the verb, not the noun') }}</option>
                <option value="recover" title="{{ __('Recover content from the recycle bin.') }}">{{ __('Recover') }}</option>`

It appears it doesn't like the "comment='this is the verb, not the noun'" part. Here's the whole thing:

Arguments must be separated by a comma. Unexpected token "name" of value "comment" ("punctuation" expected with value ",") in @BotanyorgConferenceModule/Eventitem/view.html.twig at line 113. 500 Internal Server Error - Twig_Error_Syntax

`[1] Twig_Error_Syntax: Arguments must be separated by a comma. Unexpected token "name" of value "comment" ("punctuation" expected with value ",") in "@BotanyorgConferenceModule/Eventitem/view.html.twig" at line 113. at n/a in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/TokenStream.php line 87

at Twig_TokenStream->expect('9', ',', 'Arguments must be separated by a comma')
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/ExpressionParser.php line 490

at Twig_ExpressionParser->parseArguments(true)
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/ExpressionParser.php line 350

at Twig_ExpressionParser->getFunctionNode('__', '113')
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/ExpressionParser.php line 144

at Twig_ExpressionParser->parsePrimaryExpression()
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/ExpressionParser.php line 84

at Twig_ExpressionParser->getPrimary()
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/ExpressionParser.php line 41

at Twig_ExpressionParser->parseExpression()
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Parser.php line 144

at Twig_Parser->subparse(array(object(Twig_TokenParser_If), 'decideIfFork'))
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/TokenParser/If.php line 34

at Twig_TokenParser_If->parse(object(Twig_Token))
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Parser.php line 187

at Twig_Parser->subparse(array(object(Twig_TokenParser_Block), 'decideBlockEnd'), true)
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/TokenParser/Block.php line 38

at Twig_TokenParser_Block->parse(object(Twig_Token))
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Parser.php line 187

at Twig_Parser->subparse(null, false)
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Parser.php line 100

at Twig_Parser->parse(object(Twig_TokenStream))
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Environment.php line 619

at Twig_Environment->parse(object(Twig_TokenStream))
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Environment.php line 671

at Twig_Environment->compileSource('{# purpose of this template: eventitems list view #}

{% extends routeArea == 'admin' ? 'BotanyorgConferenceModule::adminBase.html.twig' : 'BotanyorgConferenceModule::base.html.twig' %} {% block title __('Eventitem list') %} {% block admin_page_icon 'list-alt' %} {% block content %}

{{ block('page_nav_links') }} {{ include('@BotanyorgConferenceModule/Eventitem/viewQuickNav.html.twig', { all: showAllEntries, own: showOwnEntries }) }}{# see template file for available options #} {% if routeArea == 'admin' %}
{% endif %}
{% if routeArea == 'admin' %} {% endif %} {% if routeArea == 'admin' %} {% endif %} {% for eventitem in items %} {% if routeArea == 'admin' %} {% endif %} {% else %} {% endfor %}
{{ __('State') }} {{ __('Title') }} {{ __('Current version') }} {{ __('Archive datetime') }} {{ __('Actions') }}
{{ eventitem.workflowState|botanyorgconferencemodule_objectState }} {{ eventitem.title|notifyFilters('botanyorgconferencemodule.filterhook.eventitems') }} {{ eventitem.currentVersion|localizeddate('medium', 'short') }} {{ eventitem.archiveDatetime|localizeddate('medium', 'short') }} {% if eventitem._actions|length > 0 %} {% endif %}
{{ __('No eventitems found.') }}
{% if showAllEntries != 1 %} {{ pager({ rowcount: pager.numitems, limit: pager.itemsperpage, display: 'page', route: 'botanyorgconferencemodule_eventitem_' ~ routeArea ~ 'view'}) }} {% endif %} {% if routeArea == 'admin' %}
{% endif %} {{ block('display_hooks') }}

{% endblock %} {% block page_nav_links %} {% if canBeCreated %} {% if hasPermission('BotanyorgConferenceModule:Eventitem:', '::', 'ACCESS_COMMENT') %} {% set createTitle = ('Create eventitem') %} {{ createTitle }} {% endif %} {% endif %} {% set own = showOwnEntries is defined and showOwnEntries == 1 ? 1 : 0 %} {% set all = showAllEntries is defined and showAllEntries == 1 ? 1 : 0 %} {% if all == 1 %} {% set linkTitle = __('Back to paginated view') %} {{ linkTitle }} {% else %} {% set linkTitle = ('Show all entries') %} {{ linkTitle }} {% endif %} {% endblock %} {% block display_hooks %}

{# here you can activate calling display hooks for the view page if you need it #}
{# % if routeArea != 'admin' %}
    {% set hooks = notifyDisplayHooks(eventName='botanyorgconferencemodule.ui_hooks.eventitems.display_view', urlObject=currentUrlObject) %}
    {% for providerArea, hook in hooks %}
        {{ hook }}
    {% endfor %}
{% endif % #}

{% endblock %} {% block footer %} {{ parent() }}

{% endblock %} ', '@BotanyorgConferenceModule/Eventitem/view.html.twig') in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Environment.php line 396

at Twig_Environment->loadTemplate('@BotanyorgConferenceModule/Eventitem/view.html.twig')
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/twig/twig/lib/Twig/Environment.php line 347

at Twig_Environment->render('@BotanyorgConferenceModule/Eventitem/view.html.twig', array('routeArea' => 'admin', 'showOwnEntries' => '0', 'showAllEntries' => '0', 'currentPage' => '1', 'pager' => array('numitems' => '0', 'itemsperpage' => '10'), 'items' => object(Paginator), 'sort' => array('workflowState' => array('url' => '/Conference/conference/admin/eventitems/view/workflowState/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'title' => array('url' => '/Conference/conference/admin/eventitems/view/title/DESC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-asc'), 'currentVersion' => array('url' => '/Conference/conference/admin/eventitems/view/currentVersion/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'archiveDatetime' => array('url' => '/Conference/conference/admin/eventitems/view/archiveDatetime/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'createdUserId' => array('url' => '/Conference/conference/admin/eventitems/view/createdUserId/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'createdDate' => array('url' => '/Conference/conference/admin/eventitems/view/createdDate/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'updatedUserId' => array('url' => '/Conference/conference/admin/eventitems/view/updatedUserId/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'updatedDate' => array('url' => '/Conference/conference/admin/eventitems/view/updatedDate/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted')), 'sdir' => 'asc', 'pagesize' => '10', 'currentUrlObject' => object(ModUrl), 'workflowState' => '', 'q' => '', 'quickNavForm' => object(FormView), 'canBeCreated' => true))
    in /Users/robbrandt/Documents/htdocs/Conference/modules/Botanyorg/ConferenceModule/Helper/Base/ViewHelper.php line 134

at Botanyorg\ConferenceModule\Helper\Base\ViewHelper->processTemplate(object(Twig_Environment), 'eventitem', 'view', object(Zikula_Request_Http), array('routeArea' => 'admin', 'showOwnEntries' => '0', 'showAllEntries' => '0', 'currentPage' => '1', 'pager' => array('numitems' => '0', 'itemsperpage' => '10'), 'items' => object(Paginator), 'sort' => array('workflowState' => array('url' => '/Conference/conference/admin/eventitems/view/workflowState/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'title' => array('url' => '/Conference/conference/admin/eventitems/view/title/DESC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-asc'), 'currentVersion' => array('url' => '/Conference/conference/admin/eventitems/view/currentVersion/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'archiveDatetime' => array('url' => '/Conference/conference/admin/eventitems/view/archiveDatetime/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'createdUserId' => array('url' => '/Conference/conference/admin/eventitems/view/createdUserId/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'createdDate' => array('url' => '/Conference/conference/admin/eventitems/view/createdDate/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'updatedUserId' => array('url' => '/Conference/conference/admin/eventitems/view/updatedUserId/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted'), 'updatedDate' => array('url' => '/Conference/conference/admin/eventitems/view/updatedDate/ASC?all=0&own=0&pageSize=10&workflowState=&q=', 'class' => 'z-order-unsorted')), 'sdir' => 'asc', 'pagesize' => '10', 'currentUrlObject' => object(ModUrl), 'workflowState' => '', 'q' => '', 'quickNavForm' => object(FormView), 'canBeCreated' => true))
    in /Users/robbrandt/Documents/htdocs/Conference/modules/Botanyorg/ConferenceModule/Controller/Base/EventitemController.php line 297

at Botanyorg\ConferenceModule\Controller\Base\EventitemController->viewInternal(object(Zikula_Request_Http), '', 'asc', '1', '0', true)
    in /Users/robbrandt/Documents/htdocs/Conference/modules/Botanyorg/ConferenceModule/Controller/Base/EventitemController.php line 127

at Botanyorg\ConferenceModule\Controller\Base\EventitemController->adminViewAction(object(Zikula_Request_Http), '', 'asc', '1', '0')
    in /Users/robbrandt/Documents/htdocs/Conference/modules/Botanyorg/ConferenceModule/Controller/EventitemController.php line 85

at Botanyorg\ConferenceModule\Controller\EventitemController->adminViewAction(object(Zikula_Request_Http), '', 'asc', '1', '0')
    in  line 

at call_user_func_array(array(object(EventitemController), 'adminViewAction'), array(object(Zikula_Request_Http), '', 'asc', '1', '0'))
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 144

at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Zikula_Request_Http), '1')
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 64

at Symfony\Component\HttpKernel\HttpKernel->handle(object(Zikula_Request_Http), '1', true)
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 69

at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Zikula_Request_Http), '1', true)
    in /Users/robbrandt/Documents/htdocs/Conference/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 193

at Symfony\Component\HttpKernel\Kernel->handle(object(Zikula_Request_Http))
    in /Users/robbrandt/Documents/htdocs/Conference/index.php line 23`
robbrandt commented 8 years ago

I've removed the comments from the template in order to continue testing

robbrandt commented 8 years ago

After regenerating this doesn't seem to be a problem. I'll open it again if it resurfaces.

robbrandt commented 8 years ago

It's doing it again now. I was able to proceed by removing the comment='this is the verb, not the noun' attribute/value from the archive and trash options in:

`