Closed (fixed)
Project:
Open Atrium
Version:
7.x-2.618
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2017 at 13:27 UTC
Updated:
28 Dec 2017 at 19:44 UTC
Jump to comment: Most recent
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
Comment #2
Jorrit commentedComment #3
mpotter commentedCommitted to acd7052 in oa_basetheme