0

I have a site running Drupal 8.6.10.
I installed it with Composer: composer create-project drupal-composer/drupal-project:8.x-dev JdP8M7b --stability dev --no-interaction
I tried to update it to 8.6.12: enter image description here

And now, I get an error when I go to any page using my default theme Mayo (no problem when I go to pages using admin theme Seven):

Le site Web a rencontré une erreur inattendue. Veuillez essayer de nouveau plus tard.</br></br><em class="placeholder">Twig\Error\SyntaxError</em>: An exception has been thrown during the compilation of a template ("Attribute "name" does not exist for Node "Twig\Node\CheckToStringNode".") in "themes/contrib/mayo/templates/block--system-menu-block.html.twig". in <em class="placeholder">Twig\Environment->compileSource()</em> (line <em class="placeholder">797</em> of <em class="placeholder">/Users/efalzon/Sites/JdP8M7b/vendor/twig/twig/src/Environment.php</em>). <pre class="backtrace">Drupal\Core\Template\TwigNodeTrans->compileString(Object) (Line: 37)
Drupal\Core\Template\TwigNodeTrans->compile(Object) (Line: 121)
Twig\Node\Node->compile(Object) (Line: 103)
Twig\Compiler->subcompile(Object) (Line: 38)
Twig\Node\BlockNode->compile(Object) (Line: 121)
Twig\Node\Node->compile(Object) (Line: 121)
Twig\Node\Node->compile(Object) (Line: 103)
Twig\Compiler->subcompile(Object) (Line: 108)
Twig\Node\ModuleNode->compileTemplate(Object) (Line: 78)
Twig\Node\ModuleNode->compile(Object) (Line: 92)
Twig\Compiler->compile(Object) (Line: 771)
Twig\Environment->compile(Object) (Line: 792)
Twig\Environment->compileSource(Object) (Line: 482)
Twig\Environment->loadClass('__TwigTemplate_b7128b0551d0a78f96214d3c3a23560aec4c9e673cc8d52ea34b27fddaa41d4c', 'themes/contrib/mayo/templates/block--system-menu-block.html.twig', NULL) (Line: 446)
Twig\Environment->loadTemplate('themes/contrib/mayo/templates/block--system-menu-block.html.twig') (Line: 64)
twig_render_template('themes/contrib/mayo/templates/block--system-menu-block.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 351)
__TwigTemplate_f653a38d19f626722860c776e638e47ff1e967a1bbf99439b558862341cf6bd3->doDisplay(Array, Array) (Line: 427)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 398)
Twig\Template->display(Array) (Line: 406)
Twig\Template->render(Array) (Line: 64)
twig_render_template('themes/contrib/mayo/templates/page.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 105)
__TwigTemplate_c0a9c9d745b014e5001be99f83f1adff9ca682260338f6d6a70aefea4539e7eb->doDisplay(Array, Array) (Line: 427)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 398)
Twig\Template->display(Array) (Line: 406)
Twig\Template->render(Array) (Line: 64)
twig_render_template('themes/contrib/mayo/templates/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
</pre>  

Any idea?

  • Are you able to access the db log page? – Madelyn Cruz Mar 20 at 3:34
  • Out of curiosity, do you use the webflo/drupal-core-strict dependency? – mpdonadio Mar 20 at 17:52
0

As an easy workaround you should try downgrading your twig

composer require twig/twig 1.37.1

Follow the discussion here and here for more up to date information.

  • Issue with twig has been resolved since 8.6.11 release, then there's regression issue and they fixed the issue in 8.6.12 release. I don't think the error he's having has something to do with previous issues. The error has something to do with the non-existing property in "themes/contrib/mayo/templates/block--system-menu-block.html.twig" as per the error he provided above. – Madelyn Cruz Mar 20 at 3:29
  • @MadelynCruz sure I just clearly stated it as a workaround that they should try, it has worked for me and there are reports that worked for other people after the fix. So I am not sure wny downvote ? – GiorgosK Mar 20 at 7:09
  • 1
    The workaround worked for me too. – gbmapo Mar 20 at 8:43
  • @gbmapo its great to see that it helped – GiorgosK Mar 20 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.