diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index f0ad15d..fe0f1ed 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -2098,12 +2098,13 @@ protected function formatThemes($themes) { $template = strtr($theme, '_', '-') . $extension; if (!$picked && !empty($registry[$theme])) { $template_path = isset($registry[$theme]['path']) ? $registry[$theme]['path'] . '/' : './'; - if (file_exists($template_path . $template)) { - $hint = t('File found in folder @template-path', array('@template-path' => $template_path)); + $template_filepath = $template_path . ($theme != 'views_view_field' ? $registry[$theme]['template'] : 'template') . $extension; + if (file_exists($template_filepath) || $theme == 'views_view_field') { + $hint = t('File found in folder @template-path', array('@template-path' => dirname($template_filepath))); $template = '' . $template . ''; } else { - $template = '' . $template . ' ' . t('(File not found, in folder @template-path)', array('@template-path' => $template_path)) . ''; + $template = '' . $template . ' ' . t('(File not found, in folder @template-path)', array('@template-path' => dirname($template_filepath))) . ''; } $picked = TRUE; }