Problem:

During this commit, #2784463: Convert outside_in_page_(top|bottom)() to a #theme_wrappers, the {% spaceless %} tag was introduced. This tag removes all the whitespace between HTML tags. It affects to almost *all* the HTML content in the page because it is used in a template that acts as a page wrapper. This only happens *IF* the outside_in module is enabled.

The spaceless tag removes whitespace that is used to add extra padding to certain UI elements, like checkbox labels, radio labels and breadcrumbs.
See screenshot.

before and after or removing Twig spaceless tag bug

Solution:

Remove the spaceless tag.

Twig Documentation of spaceless tag:
http://twig.sensiolabs.org/doc/tags/spaceless.html

Patch attached in #2

TODO:

Review patch.
Review spaceless tag used in other templates in Drupal core.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

corbacho created an issue. See original summary.

corbacho’s picture

Status: Active » Needs review
FileSize
723 bytes
corbacho’s picture

tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Nice catch. Thanks for the patch!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2810547-spaceless-1.patch, failed testing.

tedbow’s picture

Status: Needs work » Reviewed & tested by the community

Not sure what is going on. I see no test failure https://www.drupal.org/pift-ci-job/500299

corbacho’s picture

Strange. Thanks for reviewing Ted

corbacho’s picture

Status: Reviewed & tested by the community » Needs work
corbacho’s picture

Re-upload

corbacho’s picture

Status: Needs work » Needs review
corbacho’s picture

Status: Needs review » Reviewed & tested by the community

  • Cottser committed 4f6dc7b on 8.3.x
    Issue #2810547 by corbacho, tedbow: Twig spaceless tag is removing...

  • Cottser committed c2fff6f on 8.2.x
    Issue #2810547 by corbacho, tedbow: Twig spaceless tag is removing...
star-szr’s picture

Version: 8.3.x-dev » 8.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 4f6dc7b to 8.3.x and c2fff6f to 8.2.x. Thanks!

tedbow’s picture

@Cottser Thanks!

corbacho’s picture

Thank you Ted and Cottser

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

tedbow’s picture

Component: outside_in.module » settings_tray.module

Changing to new settings_tray.module component. @drpal thanks for script help! :)