@@ -, +, @@ --- C4/Templates.pm | 5 +++++ 1 file changed, 5 insertions(+) --- a/C4/Templates.pm +++ a/C4/Templates.pm @@ -256,19 +256,24 @@ sub themelanguage { my $where = $tmpl =~ /xsl$/ ? 'xslt' : 'modules'; for my $theme (@themes) { if ( -e "$htdocs/$theme/$lang/$where/$tmpl" ) { +print STDERR "CASE 1"; return ( $theme, $lang, [ uniq(@themes) ] ); } } # Otherwise return theme/'en', last resort fallback/'en' for my $theme (@themes) { if ( -e "$htdocs/$theme/en/$where/$tmpl" ) { +print STDERR "CASE 2"; return ( $theme, 'en', [ uniq(@themes) ] ); } } # tmpl is a full path, so this is a template for a plugin if ( $tmpl =~ /^\// && -e $tmpl ) { +print STDERR "CASE 3"; return ( $themes[0], $lang, [ uniq(@themes) ] ); } +print STDERR "CASE 4"; +return; } --