Undefined index message in drupal When editing a view, I get the following message in the popup.


  Notice: Undefined index: advertising_block in eva_plugin_display_entity-&gt;options_summary() 
  (line 41 of/.../sites/all/modules/eva/eva_plugin_display_entity.inc).


This view contains 2 displays: a view attached and a block (called advertising_block). This error message appeared both before and after deleting the "advertising_block" to which it seems to refer.

Any idea of what may be causing this error message and how to fix it?
Basically, the EVA module is getting called with a bundle 'advertising_block' that it doesn't know how to handle. If you used to have a block named 'advertising_block', that would be a suspect. 

The way to solve this is to (with devel installed) use the approach in webchick's Quick and Dirty Debugging. Right before line 41 of/.../sites/all/modules/eva/eva_plugin_display_entity.inc, make a temporary hack.

First, install and enable the devel module.

The code there is:

  foreach ($this-&gt;get_option('bundles') as $bundle) {
    $bundle_names[] = $entity_info['bundles'][$bundle]['label'];
  }


so we'll change it to

  foreach ($this-&gt;get_option('bundles') as $bundle) {
    if ($bundle == 'advertising_block') {
        dpm(debug_backtrace(), 'Bundle advertising_block being requested');
    }
    $bundle_names[] = $entity_info['bundles'][$bundle]['label'];
  }


Now when we hit that page, we'll see the backtrace (who called this thing, maybe why), and will have a path forward.

When you're through with this debugging code, don't forget to revert to the original code and disable devel module.

And remember that debugging like this should be done on a local dev site, not on production. Some more strategies are at randyfay.com/debugging