From 20a6edb882acf6cc2e6940eb5b1ee8ba680dbafb Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 17 Feb 2015 06:23:35 -0500 Subject: [PATCH] Bug 13473 - Plugins fail When trying to execute or configure the plugin on 3.18 I got: Template process failed: file error - doc-head-open.inc: not found at /usr/share/koha/lib/C4/Templates.pm line 129. Test Plan: 1) Install the Kitchen Sink plugin 2) Go to the configuration page of the plugin 3) Note the template processing error 4) Apply this patch 5) Refresh the page 6) Note the page now loads Signed-off-by: Nick Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 003993d547a98a3b1e085058b96aecd318ece036) Signed-off-by: Chris Cormack --- C4/Templates.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C4/Templates.pm b/C4/Templates.pm index 7456c7f625..e787ab13c3 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -302,6 +302,10 @@ sub themelanguage { return ( $theme, 'en', uniq( \@themes ) ); } } + # tmpl is a full path, so this is a template for a plugin + if ( $tmpl =~ /^\// && -e $tmpl ) { + return ( $themes[0], $lang, uniq( \@themes ) ); + } } -- 2.39.5