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

jeremycaldwell’s picture

Status: Active » Needs work

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

<?php print ' ' . $css_class; ?>

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.

jeremycaldwell’s picture

Status: Needs work » Reviewed & tested by the community

I 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:

<div id="view-id-<?php print $name; ?>-<?php print $display_id; ?>" class="view view-<?php print $css_name; ?> view-id-<?php print $name; ?> view-display-id-<?php print $display_id; ?> view-dom-id-<?php print $dom_id; ?><?php print ' ' . $css_class; ?>">

To this:

<div id="view-id-<?php print $name; ?>-<?php print $display_id; ?>" class="<?php print $classes; ?>">

I'll get this fix into the next version of the theme, thanks for reporting it.

jeremycaldwell’s picture

Status: Reviewed & tested by the community » Fixed

This has been fixed in the latest release of the theme.

jeremycaldwell’s picture

Status: Fixed » Closed (fixed)