When the cache module calls `restore_headers` it will sometimes throw an error:
Notice: Undefined index: data in views_plugin_cache->restore_headers() (regel 240 van /home/..../sites/all/modules/contrib/views/plugins/views_plugin_cache.inc).
This is caused due to an assumption that $args['data'] is set.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views-undefined_index_data-2083151-5.patch | 864 bytes | erik frèrejean |
| #4 | views-undefined_index_data-2083151-4.patch | 863 bytes | erik frèrejean |
| #1 | views-undefined_index_data-2083151-1.patch | 602 bytes | erik frèrejean |
Comments
Comment #1
erik frèrejeanI've attached a patch that will check whether
$args['data']is actually set before callingdrupal_add_js().Comment #2
erik frèrejeanComment #3
CSoft commentedWhat about css? I have two such errors instead of one.
Necessary to supplement the patch:
Comment #4
erik frèrejeanYes, you are correct. Updated the patch.
Comment #5
erik frèrejeanLooks like I clicked submit to quick, that patch contains a typo in the check.
Comment #6
edvanleeuwenTested it, after having applied https://drupal.org/node/1511396#comment-7911787
No more errors from the plugin.
Comment #7
gappleI think this issue has a better patch, but #2018737: Notice: Undefined index: data in views_plugin_cache->restore_headers() was reported first so marking this as a duplicate.
Comment #8
Exploratus commentedWorked for me.