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.
When using e.g. Panels Everywhere to manage the site, the body_classes_to_remove or body_classes_to_add from the PE display are not always added to the page display.
Comment | File | Size | Author |
---|---|---|---|
#1 | panels-n2330413-1.patch | 1.47 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaThe problem stems from panels_panel_context_render() where it only adds the new values if there are not ones assigned already.
Comment #2
DamienMcKennaComment #3
DamienMcKennaComment #5
MichelleTo test, I edited the "default site template" for PE and put "not-front" in the classes to be removed and "added-class" in the classes to add. I have a test custom page that has both of those empty in the variant I'm using. When I viewed the test page without the patch, those changes did not pass from the default site template to my custom page. With this patch, the changes to the classes show up when the page is viewed as they should.
Comment #6
DamienMcKennaGood catch, Michelle!
I compared both patches, the one from #2188787: Custom body classes not working for site template variant includes this patch and adds another little fix too. Closing this one.