Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2008 at 22:08 UTC
Updated:
4 Aug 2010 at 17:59 UTC
The default parameters for drupal_add_css() are
function drupal_add_css($path = NULL, $type = 'module', $media = 'all', $preprocess = TRUE)
Which means that when the Theme Wizard generates the following code, the css file gets added as a module-type CSS file instead of a theme-type CSS file.
drupal_add_css(path_to_theme() .'/views-list-VIEWNAME.css');
The theme wizard should be overriding the default $type = 'module' by passing 'theme' as the second parameter.
Super simple patch, so I’m taking the liberty to mark it RTBC.
| Comment | File | Size | Author |
|---|---|---|---|
| wizard-add-css.patch | 616 bytes | johnalbin |
Comments
Comment #1
johnalbinBumping this to the top of the issue queue. 5 weeks with no love means it was on page 8 of queue.
Comment #2
merlinofchaos commentedDoesn't matter what page it's on; when I get around to looking at Views 1 stuff again, I'll look at patches first. =)
Comment #3
johnalbinGood to know. I just saw 5 pages of fixed recently-fixed issues and got the sniffles. ;-)
I know you’re super busy, so its all good. I won't bump any more issues.
Comment #4
merlinofchaos commentedThey're all Views 2 related. Poor Views 1 is languishing =)
Comment #5
johnalbinWell, this patch applies cleanly to Views 2. So after it goes into 2, I can "backport" it to 1. =)
Comment #6
merlinofchaos commentedSince the theme wizard does not currently exist in Views 2 and is likely to be totally unnecessary, it does not apply to Views 2.
Comment #7
johnalbinReally? The file is still in HEAD. So I assumed… Oh. I see there is no .info file for views_theme_wizard.module, so I guess it isn’t a module, just an orphaned file.
Comment #8
merlinofchaos commentedIt's not actually in HEAD; well there's probably an entry for it because you don't really *delete* files, but if you look here: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/views/?path... you won't see the file listed.
Comment #9
johnalbinOh, that’s weird. I had a DRUPAL-5 version of Views checked out with a patched version of views_theme_wizard.module. And when I ran "cvs up -A" it showed "M views_theme_wizard.module", so I deleted that file and ran "cvs up" again. And it restored the DRUPAL-5 version of views_theme_wizard.module into my local copy of HEAD. After a year of CVS usage with Drupal and you would think I would know all the peculiarities of the CVS system. But no…
Sorry about all the unnecessary issue updates. :-(
Comment #10
sunI do not understand why this file should be added in the 'theme' scope, if it is added by a module. Could you please clarify?
Comment #11
merlinofchaos commentedCode generated by the theme wizard will be placed in a user's theme, so the premise here is correct I think.
Comment #12
sunThe problem I have with this patch is that even that is was marked as RTBC for a long time, no one else chimed in and said "yeah! this patch fixed it for me!".
Comment #13
esmerel commentedAt this time, only security fixes will be made to the 5.x version of Views.