When I put the gtranslate on my site appears this message in the valifator of w3c.org

1. Error Line 565, Column 32: document type does not allow element "style" here

CommentFileSizeAuthor
#2 error}.png37.51 KBericking
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apaderno’s picture

Title: validation error » Validation error
ericking’s picture

FileSize
37.51 KB

there is any solution?
the problem still persists...
The module is excellent but...how can we pass the validator, I am using the HTML purifier but it cannont solve this.
Any advise please

najibx’s picture

Title: Validation error » XHTML Validation error

It look like the function gtranslate_block will spit out that css where ever you enable the block. CSS/JS should be loaded when the module is enabled, since it's going to be display throughtout the website. As temporary solution, since I use "flag" only in gtranslate.module, starting line 186, I commented out and put the "complete" style in head.tpl.php or page.tpl.php, whereever inside your head. If you are using both or list down only, you'll find to find it and comment it accordingly.

I commented out

                case 'flags': {
				   // Don't output this here ...do it in page.tpl.php edited najibx
                   // $block_content .= '<style type="text/css">'."\n";
                   // $block_content .= "<!--\n";
                   // $block_content .= "a.gtflag {background-image:url('".base_path().drupal_get_path('module', 'gtranslate')."/gtranslate-files/".variable_get('gtranslate_flag_size', '16')."a.png');}\n";
                   // $block_content .= "a.gtflag:hover {background-image:url('".base_path().drupal_get_path('module', 'gtranslate')."/gtranslate-files/".variable_get('gtranslate_flag_size', '16').".png');}\n";
                   //  $block_content .= "-->\n";
                   //  $block_content .= '</style>';

Put this in your head

<style type="text/css"> 
<!--
a.gtflag {background-image:url('/sites/all/modules/gtranslate/gtranslate-files/24a.png');}
a.gtflag:hover {background-image:url('/sites/all/modules/gtranslate/gtranslate-files/24.png');}
-->
</style>
apaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, since Drupal 6 isn't supported anymore.