Notice: Undefined index: theme in theme_functions() (line 513 of /var/www/mirabel/drupal/sites/all/modules/views/includes/plugins.inc
I'm getting this notice in the advanced information popup (/admin/structure/views/nojs/display/presse/page/analyze-theme), with a content view, using a simple child theme (if related at all).
Adding if(empty($this->definition['theme'])){var_dump($this->definition);die();} in includes/plugins.inc / theme_functions() :
array
'title' => string 'Contenu' (length=7)
'help' => string 'Afficher le contenu avec une vue standard de nSud.' (length=51)
'handler' => string 'views_plugin_row_node_view' (length=26)
'path' => string 'sites/all/modules/views/modules/node' (length=36)
'base' =>
array
0 => string 'node' (length=4)
'uses options' => boolean true
'type' => string 'normal' (length=6)
'help topic' => string 'style-node' (length=10)
'module' => string 'views' (length=5)
'theme path' => string 'sites/all/modules/views/theme' (length=29)
'theme file' => string 'theme.inc' (length=9)
'file' => string 'views_plugin_row_node_view.inc' (length=30)
'parent' => string 'parent' (length=6)
'name' => string 'node' (length=4)
maybe related : #1302696: Views Facet Block produces PHP notice Undefined Index
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 1491082-7-node-theme-function.patch | 955 bytes | drzraf |
| #2 | 1491082-node-theme-function.patch | 948 bytes | dawehner |
| #1 | 1491082-1-view-theme-notice.patch | 501 bytes | drzraf |
Comments
Comment #1
drzraf commentedDisplay is called presse, information popup,
Row style output,without a patch, but ignoring the notice with :
return views_theme_functions(@$this->definition['theme'], $this->view, $this->display);:it writes:
.tpl.php, --presse.tpl.php, --default.tpl.php, --default.tpl.php, --page.tpl.php, --presse--page.tpl.phpwith the attached (quite dumb) patch:
views-view.tpl.php, views-view--presse.tpl.php, views-view--default.tpl.php, views-view--default.tpl.php, views-view--page.tpl.php, views-view--presse--page.tpl.phpComment #2
dawehnerHere is a patch which adds a bunch of suggestions how it worked in d6
Comment #4
mkadin commentedI can confirm this bug and that the patch in #1 allowed me to bring up the information popup.
Comment #5
drzraf commented#2: 1491082-node-theme-function.patch queued for re-testing.
Comment #6
drzraf commentedat least the
informationpopup display a more correct set of information after patch #2Comment #8
drzraf commentedrerolled without any functional change
Comment #10
mudderklirren commentedTry disabling Devel - that did the trick for me
Comment #11
PedroKTFC commentedBizarre! I can confirm that disabling devel gets rid of it. But isn't devel trapping the error anyway? Has the problem really gone away?!
Comment #12
jesss commentedDisabling devel does make the error message go away, but the row style output suggestions are still missing everything before the double hyphen, so it doesn't solve the problem.
Comment #13
rvelhote commentedI also had this problem and had the devel module enabled but I just had to change the Error handlers to Standard Drupal
Comment #14
hedel commented#1 from @drzraf was working for me! thanks!
Comment #14.0
hedel commentedrelated bug ?
Comment #15
pere orgaDisabling Devel works
Comment #16
interdruper commentedI can confirm that #13 also gets rid of it, without requiring to disable Devel.
Comment #17
othermachines commented- Confirm problem still exists with most recent -dev (7.x-3.7+38-dev).
- Confirm disabling Devel or changing Devel setting as in #13 removes error, but template suggestions are not fully formed.
- Confirm #8 patch (@drzraf) resolves error and provides the following template suggestions:
Comment #18
DrCord commentedThe patch in #1 seemed to work for me fine. My template suggestions seem correct.
Comment #19
Cyclodex commentedConfirm problem still with version 7.x-3.10.
The row style output is not correct without the patch from #1.
Can someone check this, why this happens or if this patch really should be applied?!
UPDATE:
I also tried #8 which does add the node string to the suggestions, but it breaks my views. I can't preview anymore the content and get ajax error.
I look closer to the row suggestion, and the title which normally shows you the suggested code sais:
So perhaps it simply should not show anything?
I have no idea here, just try to help with some insights.
Comment #20
Anonymous (not verified) commented@Cyclodex,
perhaps your view display format is set to “content”, if you change it to field and add one field, you should be able to see the template in the theme info overlay.
the patch in #1 works.
Comment #22
colanThanks all. Committed #1 with proper coding standards.
Comment #23
colanComment #26
catchComment #33
lendudeClosing this. If somebody has some steps to reproduce this on D8 feel free to reopen this or open a new issue.