How to reproduce
* Create a panels everywhere site template with custom body class
* Create a panel with custom body class

Bug: One body class is omitted.

Problem: The code from #1379538: Allow custom body classes can not handle more than one configuration.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geek-merlin’s picture

Status: Active » Needs review
FileSize
2.45 KB

Patch flying in that fixes that for me.

DamienMcKenna’s picture

FileSize
2.04 KB

I've ran into this in Panelizer too: #2246871: Body CSS classes not added when using Panels Everywhere

Thanks for the patch. This version adds a quick trim() around the two strings, just to make sure the output is clean.

juanjo_vlc’s picture

Hi, I've the same issue, and got to the same conclusion, and very similar patch.
#2 Your trim is unnecessary, because it doesn't clear two consecutive whitespaces on the css string, and thus, explode will make empty values from them when removing classes, and submit function on panel editor must take care of it.

SGhosh’s picture

For panels version '7.x-3.3', in case anybody comes looking for it -

PFA

Status: Needs review » Needs work

The last submitted patch, 4: panels-body_classes_add_remove_not_working-2188787-4.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review

Michelle’s picture

Is this addressing the same bug as #2330413: body_classes_to_remove/body_classes_to_add not added correctly ? I reviewed that one just before coming to this one and that patch seems to fix the issue because both the site template body class and the custom page variant body class show up when that patch is applied.

Since Damien has a patch in both of these issues, I'm wondering if I'm missing something so I'm not going to change the status. It seems, though, that the other patch solves both problems. Could someone confirm/refute that?

DamienMcKenna’s picture

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community

RTBC. Thanks juanjo_dv.

mrjmd’s picture

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, committed!

  • japerry committed 6a19d8d on 7.x-3.x authored by juanjo_dv
    Issue #2188787 by DamienMcKenna, axel.rutz, juanjo_dv: Custom body...

Status: Fixed » Closed (fixed)

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