Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I am getting the following message after install.
Notice: Undefined variable: css_class in include() (line 30 of /var/www/vhosts/ecommercium.com/httpdocs/sites/all/themes/jbase5/templates/views/view/views-view.tpl.php).
Please advice me
Comments
Comment #1
jeremycaldwell CreditAttribution: jeremycaldwell commentedAt the moment I'm not sure if this is a bug with Views or not as the variable "$css_class" is valid. I tried setting an "if" statement on that so if "$css_class" then show it otherwise hide it and that didn't work either.
So at the moment the easy fix is to edit your theme's "views-view.tpl.php" and remove this bit of code if you don't need to use the "$css_class" provided by Views.
I'll look into this a bit more later but for now it's not that big of a deal as it's just a warning message and doesn't break anything that I'm aware of.
Comment #2
jeremycaldwell CreditAttribution: jeremycaldwell commentedI reworked the "views-view.tpl.php" wrapping div a bit and reduced it's output to work with the classes provided by Views as well as adding the unique ID to it.
Rather than make the change suggested above, try changing line 30 of "views-view.tpl.php" from this:
To this:
I'll get this fix into the next version of the theme, thanks for reporting it.
Comment #3
jeremycaldwell CreditAttribution: jeremycaldwell commentedThis has been fixed in the latest release of the theme.
Comment #4
jeremycaldwell CreditAttribution: jeremycaldwell commented