Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | body-classes-missing-2188787-3.patch | 2.17 KB | juanjo_vlc |
Comments
Comment #1
geek-merlinPatch flying in that fixes that for me.
Comment #2
DamienMcKennaI'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.
Comment #3
juanjo_vlc CreditAttribution: juanjo_vlc commentedHi, 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.
Comment #4
SGhosh CreditAttribution: SGhosh commentedFor panels version '7.x-3.3', in case anybody comes looking for it -
PFA
Comment #6
DamienMcKennaComment #8
MichelleIs 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?
Comment #9
DamienMcKennaClosed a duplicate: #2330413: body_classes_to_remove/body_classes_to_add not added correctly
Comment #11
DamienMcKennaComment #12
DamienMcKennaRTBC. Thanks juanjo_dv.
Comment #13
mrjmd CreditAttribution: mrjmd commentedComment #14
japerryLooks good, committed!