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.
Using about all the latest dev versions of all drupal modules (except core)
Directly after creating a clone of a page variant in Panels, this error appears:
Undefined index: body_classes_to_remove in panels_panel_context_edit_settings()
Although not caused by the same action, it appears as one of the errors mentioned here:
http://drupal.org/node/1489914
Comment | File | Size | Author |
---|---|---|---|
#12 | panels-n1627698-12.patch | 1.36 KB | DamienMcKenna |
Comments
Comment #1
Yuri CreditAttribution: Yuri commentedto be complete, the error is:
Comment #2
ltwinner CreditAttribution: ltwinner commentedGetting the same error after cloning using Panels version 7.x-3.2
Comment #3
ltwinner CreditAttribution: ltwinner commentedFlushed all caches, message has gone away now.
Comment #4
calefilm CreditAttribution: calefilm commentedGot the same error using 7.x-3.2. If I re-save it it goes away but i can't help from receiving the error in the first place.
Comment #5
intyms CreditAttribution: intyms commentedI get the same error when i changed the administrative title of the variant (old title "Marfuri", new title "Product-display")
I am using:
drupal 7.18
Chaos tools 7.x-1.2
Panels 7.x-3.3
I18n 7.x-1.8
Comment #6
sonicthoughts CreditAttribution: sonicthoughts commented+1 - is this something to be concerned about???
Comment #7
somatics CreditAttribution: somatics commentedI'm seeing this on a bunch of panels on our site too, but I'm not sure if they were all cloned from other variants (we've had some of these panels on this site for 5 years).
Comment #8
Summit CreditAttribution: Summit commentedHi,
Can this be connected with the fact that the body-field is a different thing from Drupal 6 to Drupal 7.
My views and panels gives problems with the body-field after Update from D6-D7.
Greetings, Martijn
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedThis error is not serious. The body_classes_to_remove feature was added later, but it appears the code does not properly deal with the fact that older panels won't have this set.
As a workaround, you can re-save (and then re-export, if necessary) the panels and it will make the notice go away.
The error *is* annoying, it shouldn't be happening. There needs to be an empty() check where the item is used; that can prevent the notice. If anyone wants to write the patch, it would be appreciated.
Comment #10
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedJust adding here:
enabled panels_everywhere module
cloned a variant for the site template
the error showed up
Comment #11
ergophobe CreditAttribution: ergophobe commentedThis patch fixes it for me. It's nothing but an empty check as merlinofchaos suggests.
Comment #12
DamienMcKennaA minor adjustment.
Comment #13
DamienMcKennaComment #14
DamienMcKennaComment #16
MichelleThe patch in #12 applies cleanly and fixes the error when tested using the repro steps in #10.
Comment #18
mrjmd CreditAttribution: mrjmd commentedComment #19
japerryAhh yah thats simple. Fixed!