If block content is created using a theme() call that does not take an argument, as in
$block['content'] = theme('amazon_store_search_block');
Then you get the E_NOTICE message:
Notice: Undefined index: render element in contextual_preprocess() (line 82 of modules/contextual/contextual.module).
The attached patch just checks for this situation and avoids it. The code already dealt with the situation of not having found an element.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drupal.contextual_no_theme_arg.patch | 590 bytes | rfay |
Comments
Comment #1
rfayPatch was lost. Seems to happen regularly these days.
Comment #2
kevin hankens commented#1: drupal.contextual_no_theme_arg.patch queued for re-testing.
Comment #3
kevin hankens commentedThis looks good to me. This morning I added a custom contextual link to a block and this error showed up, I can see this being a pretty common scenario.
The patch works great and doesn't appear to cause any problems on my end.
Comment #4
dries commentedCommitted to CVS HEAD. Thanks.