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.

CommentFileSizeAuthor
wizard-add-css.patch616 bytesjohnalbin

Comments

johnalbin’s picture

Bumping this to the top of the issue queue. 5 weeks with no love means it was on page 8 of queue.

merlinofchaos’s picture

Doesn't matter what page it's on; when I get around to looking at Views 1 stuff again, I'll look at patches first. =)

johnalbin’s picture

Good 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.

merlinofchaos’s picture

They're all Views 2 related. Poor Views 1 is languishing =)

johnalbin’s picture

Version: 5.x-1.x-dev » 6.x-2.x-dev

Well, this patch applies cleanly to Views 2. So after it goes into 2, I can "backport" it to 1. =)

merlinofchaos’s picture

Version: 6.x-2.x-dev » 5.x-1.6

Since the theme wizard does not currently exist in Views 2 and is likely to be totally unnecessary, it does not apply to Views 2.

johnalbin’s picture

Since the theme wizard does not currently exist in Views 2…

Really? 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.

merlinofchaos’s picture

It'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.

johnalbin’s picture

Oh, 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. :-(

sun’s picture

I do not understand why this file should be added in the 'theme' scope, if it is added by a module. Could you please clarify?

merlinofchaos’s picture

Code generated by the theme wizard will be placed in a user's theme, so the premise here is correct I think.

sun’s picture

Status: Reviewed & tested by the community » Needs review

The 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!".

esmerel’s picture

Status: Needs review » Closed (won't fix)

At this time, only security fixes will be made to the 5.x version of Views.