Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2011 at 11:50 UTC
Updated:
1 Jun 2012 at 14:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerWell what a wonder, the variable $css_class doesn't exist :)
Maybe you could check first whether $css_class is !empty().
Alternative we could fix the preprocess function to include a default value = ''.
Comment #2
bruno2 commentedHey,
thanks for your fast answer. I hope i don`t misunderstand you, but why should the $css_class not exist? It works very good, only the message from drupal mean there is a fault!
Comment #3
dawehnerWell it's only set if the user has defined a css, if the view has not, it's not set.
Comment #4
damiankloip commentedHere is a patch to set the css_class variable first, and also use drupal_html_class instead of the preg_replace, which I think should be fine?
Comment #5
tim.plunkettI like this approach.
Comment #6
dawehnerThis lowercases the css classes, so it's a bit out of scope as the other parts of views, doesn't do that.
Task for myself: look at previous issues regarding css classes, because there were issues with this function.
Comment #7
damiankloip commentedAh, ok, shall we switch it back to the preg_replace that was there before then?
Comment #8
damiankloip commentedOK, so we should just make sure the variable is set for now?
Comment #9
tim.plunkettYeah keep it simple for now.
Comment #10
damiankloip commentedComment #11
dawehnerAwesome, looks perfect :)
Committed to 6.x-3.x and 7.x-3.x