Open alanmels opened 4 weeks ago
The path /core/modules/views/theme/
does not exist, because all the templates are in the /core/modules/views/templates/
.
The code block around offending line 2040 looks like this:
{
$output .= '<p>' . t('This is the default theme template used for this style.') . '</p>';
$output .= '<textarea readonly="readonly" rows="15" cols="82" class="code-sample">' . check_plain(file_get_contents('./' . $plugin->definition['theme path'] . '/' . strtr($plugin->definition['theme'], '_', '-') . '.tpl.php')) . '</textarea>';
}
Looking the content of $plugin->definition
shows an array of 17 elements:
(Array, 17 elements)
title (String, 21 characters ) Entity Reference list
help (String, 54 characters ) Returns results as a list of labels and rendere...
handler (String, 28 characters ) entityreference_plugin_style
theme (String, 22 characters ) views_view_unformatted
theme path (String, 24 characters ) core/modules/views/theme
theme file (String, 9 characters ) theme.inc
uses row plugin (Boolean) TRUE
uses fields (Boolean) TRUE
uses options (Boolean) TRUE
type (String, 15 characters ) entityreference
even empty (Boolean) TRUE
module (String, 15 characters ) entityreference
path (String, 36 characters ) core/modules/entityreference/plugins
file (String, 32 characters ) entityreference_plugin_style.inc
parent (String, 6 characters ) parent
name (String, 21 characters ) entityreference_style
uses grouping (Boolean) TRUE
and as you see the used theme path
element has a value of core/modules/views/theme
, which does not exist. I am not sure here if the theme path
is really needed in order not to break anything, and a new template path
element must be added indicating the existing core/modules/views/templates
, or just the value must be replaced with the existing path.
Confirmed @alanmels 👍🏼 ...it seems to be an easy fix. PR coming up.
Jinx 😅 ...closing my PR.
Pardon @klonos, I was doing the same staff :)
No worries @alanmels ...this is RTBC.
PS: I've updated the issue summary with some additional steps to reproduce the problem more easily.
Steps To Reproduce
To reproduce the behavior:
admin/config/development/logging
./admin/structure/views/view
, select any Views.Entity reference
display and then click on theInformation
link under theOther
section against theTheme:
option.Style output
orRow style output
-> the default theme template text box is empty, and errors are shown 👎🏼The errors for each selection are respectively:
and