When turning on Minify HTML under Performance, the Gtranslate block breaks. Normally only one dropdown should be shown (without the Powered by Google text).

I have uploaded a screenshot showing this. Any help would be greatly appreciated. Thanks.

CommentFileSizeAuthor
gtranslate.PNG5.01 KBnwom

Comments

NWOM created an issue. See original summary.

nwom’s picture

Issue summary: View changes
slydevil’s picture

Assigned: Unassigned » slydevil

This error is due to stripping out comments in CSS:

<style type="text/css">
<!--
#goog-gt-tt {display:none !important;}

.goog-te-banner-frame {display:none !important;}

.goog-te-menu-value:hover {text-decoration:none !important;}

body {top:0 !important;}

#google_translate_element2 {display:none!important;}
-->
</style>

The result is this:
<style type="text/css"></style>

This module should not be removing html comments within the

has a specific purpose - https://www.w3.org/TR/CSS21/syndata.html#comments
slydevil’s picture

When stripping out the style tags, this module is using the wrong regex. Introduced here: https://cgit.drupalcode.org/minifyhtml/commit/minifyhtml.module?h=7.x-1....

  • slydevil committed de6897f on 8.x-1.x authored by facine
    Issue #3038512, #3025864 by facine: Remove HTML comments option removes...

slydevil credited facine.

slydevil’s picture

Status: Active » Fixed

  • slydevil committed 07b77a1 on 7.x-1.x authored by facine
    Issue #3038512, #3025864 by facine: Remove HTML comments option removes...
slydevil’s picture

Status: Fixed » Closed (fixed)
nwom’s picture

Thank you so much for this!