After copying the system module's html.html.twig template into my theme's template folder to make some changes to the template, I received the following message when visiting any page my theme is used:
If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild

After following all the suggestions on the rebuild documentation page, the message still shows. Once I removed the template file from my theme directory everything worked fine. Checking the log messages, there are two listed after reloading the page:
Twig_Error_Syntax: The filter "clean_class" does not exist in "themes/custom/twigal/templates/html.html.twig" at line 35 in Twig_ExpressionParser->getFilterNodeClass() (line 573 of /var/www/drupal-8/core/vendor/twig/twig/lib/Twig/ExpressionParser.php).

Line 35 in the system module's html.html.twig template is:
not root_path ? 'path-frontpage' : 'path-' ~ root_path|clean_class,

Line 36 also contains clean_class

Comments

star-szr’s picture

Version: 8.1.x-dev » 8.0.x-dev
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Twig

Thanks for the report, Richard!

I'm changing the version to 8.0.x but want to make sure you're not testing 8.1.x-dev. That's not open for development yet although it does exist in the git repository. The clean_class filter doesn't exist in that branch which could be part of the issue here…

As of this writing, the system module's html.html.twig no longer contains the clean_class usage, but Classy's html.html.twig template does.

Could you please re-test and report back? I'm not able to reproduce this. Here's what I tried:

  1. Clean installation of Drupal 8, standard profile.
  2. Copied html.html.twig from core/themes/classy/templates/layout/html.html.twig to core/themes/bartik/templates/html.html.twig.
  3. Visited homepage.
  4. Rebuilt cache (drush cr).
  5. Visited homepage again.
Richard Buchanan’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Re-tested on 8.0.x-dev and indeed everything went smooth. My bad for originally testing on 8.1.x-dev, should have realized that before submitting this issue. Thanks Cottser!