Variable edit mode does not exist

Does search google and forum. Wonder why not finding anything about that…

I installed basic demo package with twig templates. Everything works fine. Admin, frontend… Top!
Just added one new action in BlogController.php:

    public function blogRollAction(Request $request)
{
    $blogRollList = DataObject\BlogRoll::getList();
    $this->view->blogRollItems = $blogRollList;
    $this->renderView(':Blog:blogroll.html.twig');
}

Blog/blogroll.html.twig is just a copy of Blog/detail.html.twig with some hardly setted things like description / title text etc.

When trying to open the page, error message with “Variable edit mode does not exist” appears. Also shown in admin… Don’t know what to do. Perhaps you can help :slight_smile:

 Twig\Error\

RuntimeError
in \app/Resources/views/layout.html.twig (line 19)
{% do pimcore_head_link().appendStylesheet(asset(‘static/css/global.css’)) %} {% do pimcore_head_link().appendStylesheet(asset(‘static/lib/video-js/video-js.min.css’), ‘screen’) %} {% do pimcore_head_link().appendStylesheet(asset(‘static/lib/magnific/magnific.css’), ‘screen’) %} {% do pimcore_head_link().appendStylesheet(asset(‘static/css/print.css’), ‘print’) %} {% if editmode %} {% do pimcore_head_link().appendStylesheet(asset(‘static/css/editmode.css’)) %} {% endif %} {% do pimcore_head_script().appendFile(asset(‘static/js/jquery-1.11.0.min.js’)) %} {% do pimcore_head_script().appendFile(asset(‘static/bootstrap/js/bootstrap.js’)) %}
__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166->{closure}()
in \var/cache/dev/twig/28/289d35794e0ed4943182ae47c0925f58271b553cfd0c4ee5d28de050b5d18164.php (line 83)
__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166->doDisplay(array(‘app’ => object(AppVariable), ‘container’ => object(appAppKernelDevDebugContainer)), array(‘layout_head_meta’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_layout_head_meta’), ‘head_stylesheets’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_head_stylesheets’), ‘head_ie_stylesheets’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_head_ie_stylesheets’), ‘scripts’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_scripts’), ‘content’ => array(object(__TwigTemplate_b6e04b0291238be84c6cd0969dfdf3aa1a9deb8f9c4efdc7379dcba31960438a), ‘block_content’)))
in \vendor/twig/twig/src/Template.php (line 407)
Template->displayWithErrorHandling(array(‘app’ => object(AppVariable), ‘container’ => object(appAppKernelDevDebugContainer)), array(‘layout_head_meta’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_layout_head_meta’), ‘head_stylesheets’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_head_stylesheets’), ‘head_ie_stylesheets’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_head_ie_stylesheets’), ‘scripts’ => array(object(__TwigTemplate_d76b68de6a65fc6b9f834087eaceb1291faaca07041995a99e390be06d70e166), ‘block_scripts’), ‘content’ => array(object(__TwigTemplate_b6e04b0291238be84c6cd0969dfdf3aa1a9deb8f9c4efdc7379dcba31960438a), ‘block_content’)))
in \vendor/twig/twig/src/Template.php (line 380)
Template->display(array(‘app’ => object(AppVariable), ‘container’ => object(appAppKernelDevDebugContainer)), array(‘content’ => array(object(__TwigTemplate_b6e04b0291238be84c6cd0969dfdf3aa1a9deb8f9c4efdc7379dcba31960438a), ‘block_content’)))
in \var/cache/dev/twig/8b/8bd550c24d86baef217aafc181c6c474163247ccf61afca10b62fe63e174c34e.php (line 53)
__TwigTemplate_b6e04b0291238be84c6cd0969dfdf3aa1a9deb8f9c4efdc7379dcba31960438a->doDisplay(array(‘app’ => object(AppVariable), ‘container’ => object(appAppKernelDevDebugContainer)), array(‘content’ => array(object(__TwigTemplate_b6e04b0291238be84c6cd0969dfdf3aa1a9deb8f9c4efdc7379dcba31960438a), ‘block_content’)))
in \vendor/twig/twig/src/Template.php (line 407)
Template->displayWithErrorHandling(array(‘app’ => object(AppVariable), ‘container’ => object(appAppKernelDevDebugContainer)), array(‘content’ => array(object(__TwigTemplate_b6e04b0291238be84c6cd0969dfdf3aa1a9deb8f9c4efdc7379dcba31960438a), ‘block_content’)))
in \vendor/twig/twig/src/Template.php (line 380)
Template->display(array())
in \vendor/twig/twig/src/Template.php (line 392)
Template->render(array())
in \vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php (line 53)
TwigEngine->render(’:Blog:blogroll.html.twig’, array())
in \vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php (line 49)
TwigEngine->render(’:Blog:blogroll.html.twig’, array())
in \vendor/symfony/symfony/src/Symfony/Component/Templating/DelegatingEngine.php (line 41)
DelegatingEngine->render(’:Blog:blogroll.html.twig’, array())
in \vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php (line 211)
AbstractController->renderView(’:Blog:blogroll.html.twig’)
in \src/AppBundle/Controller/BlogController.php (line 138)
BlogController->blogRollAction(object(Request))
in \vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
HttpKernel->handleRaw(object(Request), 1)
in \vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
HttpKernel->handle(object(Request), 1, true)
in \vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 198)
Kernel->handle(object(Request))
in \web/app.php (line 36)

Found it again by myself… Got the pass all view variables assigned before within the action, using $this->view->getAllParameters():

    public function blogRollAction(Request $request)
{
    $blogRollList = DataObject\BlogRoll::getList();
    $this->view->blogRollItems = $blogRollList;
    $this->renderView(':Blog:blogroll.html.twig', $this->view->getAllParameters());
}