First, thank you for the GREAT module. We love it around here.

We noticed in version 3.4, that classes on panel pane divs started showing up twice. It doesn't show the duplicates under "Inspect element" in Chrome, but when you view the actual page source, it does. And it also shows up as an error on validators. It didn't seem to be an issue in version 3.3.

Here are some examples of what it looks like in code:

<div class="panel-pane pane-views-panes pane-slide-slideshow-panel-pane-1"   class="panel-pane pane-views-panes pane-slide-slideshow-panel-pane-1">

and

<div class="panel-pane pane-node-content"   class="panel-pane pane-node-content">

Is anyone else seeing this? My apologies if this is a duplicate post-- I searched for it and didn't find it.

Thanks.

Comments

strings6’s picture

Issue summary: View changes
strings6’s picture

Issue summary: View changes
strings6’s picture

Hello,

Is anyone else experiencing this issue? I'm seeing it on our newest sites in development where drush pulled in Panels 3.4. The biggest problem that it causes is validation errors. Browsers seem to deal with the duplicates just fine, but the validators don't like it.

Thanks

fox mulder’s picture

Same problem here ( Panels version: 7.x-3.4 ):

This solves the problem for me ( template.php ):

function YOURTHEME_preprocess_panels_pane(&$variables){
  if (
    isset($variables['classes_array']) &&
    isset($variables['attributes_array']['class']) &&
    !empty($variables['classes_array']) &&
    !empty($variables['attributes_array']['class'])
  ) {
    $merge = array_unique(array_merge($variables['classes_array'], $variables['attributes_array']['class']));
    $variables['classes_array'] = $merge;
    unset($variables['attributes_array']['class']);
  }
}
joelcollinsdc’s picture

Same issue here

DRIVE’s picture

Same issue for Panels 7.x-3.5

DRIVE’s picture

Version: 7.x-3.4 » 7.x-3.5
oksana-c’s picture

same here - using 7.x-3.5+8-dev.

@fox mulder Thank you

#4 fixes the issue temporarily. I browsed through module code and can't figure out where classes get doubled.

strings6’s picture

Thanks fox mulder.

I'll pass the fix in #4 along to our themer. I'll keep following the topic to see if the cause is found and squashed.