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

Status: Active » Closed (duplicate)

Sorry, hiccup when submitting form. Seems to have submitted multiples. Will remove. (see http://drupal.org/node/1995306)