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

Files: 

Comments

to be complete, the error is:

Notice: Undefined index: body_classes_to_remove in panels_panel_context_edit_settings() (line 732 of /home/testsite/public_html/sites/all/modules/panels/plugins/task_handlers/panel_context.inc).
Notice: Undefined index: body_classes_to_add in panels_panel_context_edit_settings() (line 740 of /home/testsite/public_html/sites/all/modules/panels/plugins/task_handlers/panel_context.inc).

Getting the same error after cloning using Panels version 7.x-3.2

Flushed all caches, message has gone away now.

Got 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.

I get the same error when i changed the administrative title of the variant (old title "Marfuri", new title "Product-display")

    Notice: Undefined index: body_classes_to_remove in panels_panel_context_edit_settings() (line 734 of X:\xampp-sites\for7\sites\all\modules\panels\plugins\task_handlers\panel_context.inc).
    Notice: Undefined index: body_classes_to_add in panels_panel_context_edit_settings() (line 742 of X:\xampp-sites\for7\sites\all\modules\panels\plugins\task_handlers\panel_context.inc).

I am using:
drupal 7.18
Chaos tools 7.x-1.2
Panels 7.x-3.3
I18n 7.x-1.8

+1 - is this something to be concerned about???

I'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).

Hi,

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

This 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.

Issue tags:+Panels Everywhere

Just adding here:
enabled panels_everywhere module
cloned a variant for the site template
the error showed up

Assigned:Unassigned» ergophobe
Issue summary:View changes
Status:Active» Needs review
StatusFileSize
new1.36 KB

This patch fixes it for me. It's nothing but an empty check as merlinofchaos suggests.