Related to #1215192

How to replicate:

1) Create a view that outputs at least 3 rows

2) In mothership theme options, set View Classes configuration as:

  • Yes - Remove .view-row
  • Yes - Remove .view-row-$count
  • No - Remove .view-row-first & .view-row-last
  • No - Rename .view-row-$count, .view-row-first & .view-row-last to : count-$count, .first & .last

3) View page. You should get this complaint (notice):

Notice: Undefined offset: 1 in mothership_preprocess_views_view_unformatted() (line 82 of /path/to/mothership/functions/views.php).

Why

This is because in line 82, the conditional states: if ( $vars['classes'] && ($vars['classes'][$id]) ).

Though $vars['classes'][$id] is set for the first row and last rows somewhere above, it isn't set for the middle rows since we're not specifying classes for them. Rather than just checking for $vars['classes'][$id], it should use array_key_exists($id, $vars['classes']) instead.

Will attach patch shortly.

Comments

victoriachan’s picture

StatusFileSize
new568 bytes

Patch attached.

mortendk’s picture

Status: Active » Reviewed & tested by the community

wonderfull thanx applied to dev

mortendk’s picture

Status: Reviewed & tested by the community » Fixed
mortendk’s picture

Status: Fixed » Closed (fixed)