This module places a <style> tag at the bottom of the page using hook_footer()

<style> cannot be placed outside of <head>

CommentFileSizeAuthor
#1 getsatisfaction-409108.patch1.56 KBjjeff

Comments

jjeff’s picture

StatusFileSize
new1.56 KB

Here's a patch which fixes this problem. It's actually an add-on to the patch over at http://drupal.org/node/391762 so sorry if it doesn't apply without the other part, but you get the gist at least. Here's what the patch does:

* Changes from hook_footer() to hook_init()
* Removes the drupal_add_css() since this function only works with local CSS files - this line was never working correctly with this module
* Uses drupal_set_html_head to add the (remote) CSS file to the page HEAD
* Removes the function output, since hook_init() doesn't expect output

flevour’s picture

Status: Active » Fixed

Reviewed, tested and committed.
Thank you Jeff,
Francesco

Status: Fixed » Closed (fixed)

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

frankcarey’s picture

I'm still getting this in my html body near the end..

<script type="text/javascript">
<!--//--><![CDATA[//><!--
var tab_options = {}
tab_options.placement = "right";
tab_options.color = "#222"
GSFN.feedback('http://getsatisfaction.com/matador/feedback/topics/new?display=overlay&style=idea', tab_options);
//--><!]]>
</script>
 

I just downloaded the 1.0 version a couple days ago. did this get left in by accident? The problem is that it's breaking popups api popups.

frankcarey’s picture

Status: Closed (fixed) » Active
frankcarey’s picture

Status: Active » Closed (fixed)

ah, ok should have had 6.1.1! funny that drush didn't pick the right one... worked on svn update code ?! :) closing issue.

frankcarey’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Closed (fixed) » Active

note that the code is still outputting to the footer. though I'm not sure how bad that is if the idea is for the tab to be the last thing loaded.

the drupal_add_js() should be 'header' not 'footer' to "fix" the title of the issue.

flevour’s picture

Status: Active » Closed (works as designed)

Hi Frank,
the issue is about style tag not being output in head, which has been fixed.
I prefer outputting the JS in the footer, so the page doesn't hang while the external scripts are loaded.
It is also suggested by Yahoo: http://developer.yahoo.com/performance/rules.html#js_bottom
Thanks for the report anyway :)
Francesco