CSS imported more than once...

leafish_paul - November 28, 2005 - 17:39
Project:Dashboard
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:merlinofchaos
Status:closed
Description

As the dashboard.css file is imported in hook_view, it can be imported more than once if a site is displaying more than one dashboard on a single page.

Attached patch fixes this by placing the drupal_set_head() call in hook_menu() instead, which I is the correct place. I've also altered the call to get the path to the module/CSS file properly using drupal_get_path() instead of $GLOBALS[base_url].

Note this issue applies to 4.6 version, too: patch on its way.

AttachmentSize
dashboard.module_insert_css_correctly.patch1 KB

#1

leafish_paul - November 28, 2005 - 17:41

The rest of that post:

Attached patch fixes this by placing the drupal_set_head() call in hook_menu() instead, which I think is the correct place. I've also altered the call to get the path to the module/CSS file properly using drupal_get_path() instead of $GLOBALS[base_url].

AttachmentSize
dashboard.module_insert_css_correctly_0.patch 1 KB

#2

merlinofchaos - November 28, 2005 - 17:45
Assigned to:Anonymous» merlinofchaos
Status:needs review» fixed

Patch applied and committed.

Thank you!

(This points out that no matter how much I think I've figured out about The Right Way to do things in Drupal, there's always something else I didn't notice)

#3

leafish_paul - November 28, 2005 - 17:46

Fastest. Contrib. Commit. Ever.

Nice one!

#4

Anonymous - December 12, 2005 - 18:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.