#1880100-48: Allow to configure the h3 element for view style plugins tells something about a missing variable in views-view.html.twig, but the variable was actually missing in a different template.

Steps to reproduce:

  1. Clean install of Drupal 8.
  2. Try to print a template in bartik/templates/node.html.twig that does not exist - {{ badvariable }}
  3. Clear caches.
  4. Visit /node - you should see an exception like the following:

User warning: badvariable could not be found in _context in "core/themes/bartik/templates/page.html.twig" at line 170 in Drupal\Core\Template\TwigTemplate->getContextReference() (line 51 of core/lib/Drupal/Core/Template/TwigTemplate.php).

Since this exception is not coming from upstream Twig internals we should be able to fix it here, and maybe improve the error message while we're at it.

Comments

Cottser’s picture

Issue tags: +Twig, +Twig engine

Tagging.

Cottser’s picture

Issue summary: View changes

Add STR and more information

joelpittet’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

With strict_variables off, as it is in core, you don't get that message. Or maybe I've got something messed up on my system...

joelpittet’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Old and unreproducible.