oa_basetheme\includes\panel.inc contains the following code:

function oa_basetheme_preprocess_panelizer_view_mode(&$variables) {
  $element = $variables['element'];

  // Add some custom classes.
  $variables['classes_array'] = array();
  $variables['classes_array'][] = drupal_html_class($element['#entity_type'] . '-' . $element['#bundle']);
  $variables['classes_array'][] = drupal_html_class('view-mode-' . $element['#view_mode']);
}

This is copied from radix, which has the same code.

Several things are breaking here, as also noted in Radix issue 2454051:

1. This function resets all classes, breaking panelizer behavior.
2. This function references $element['#entity_type'] and $element['#bundle'], which don't exist.
3. PanelizerEntityDefault::preprocess_panelizer_view_mode() already adds several useful classes, among which an entitytype-bundle class.

I propose that https://www.drupal.org/files/issues/reset_of_panelizer_view-2454051-4.patch is applied to oa_basetheme. It applies cleanly.

Comments

Jorrit created an issue. See original summary.

Jorrit’s picture

Status: Active » Needs review
mpotter’s picture

Status: Needs review » Fixed

Committed to acd7052 in oa_basetheme

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.