Needs work
Project:
Views (for Drupal 7)
Version:
7.x-3.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2012 at 15:27 UTC
Updated:
5 Jan 2015 at 21:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerHere is a small patch which should fix that issue.
Comment #2
DrupalDan commentedthank for the patch dawehner. Yes, it works and everything seems pretty good.
Comment #3
tim.plunkettYet Another Undefined Index Error
Comment #4
dawehnerThanks for testing the patch!
Committed to 7.x-3.x and 8.x-3.x
Comment #6
boobaaSeems like it's not enough; I am running into the same error if I have "Add views row classes" ON, "Add striping (odd/even), first/last row classes" OFF, "Override normal sorting if click sorting is used" OFF, the view has no results, but the view does have a message to be displayed IN the table if there is no result. In this case it seems like that while there are no (result) rows in template_preprocess_views_view_table() (so $vars['rows_classes'] will NOT be set), there ARE (table) rows to be displayed, so we are running into the error because there's no $rows_classes variable set.
I must admit that one can get rid of the error message by enabling "Add striping (odd/even), first/last row classes", but that's only masking the problem.
Comment #7
olarin commentedThis patch is slightly careless as it will inadvertently remove "views-row-first" and "views-row-last" from the empty table row if they were otherwise being set, but perhaps this is desirable as it's not really a normal row anyway?
Comment #9
olarin commentedComment #14
olarin commented