Template files located in module subdirectories and invoked in a preprocess function are no longer found due to #396224.

Per issue discussion on #396224: SA-CORE-2009-003 - Local file inclusion on Windows , the use of:

$variables['template_files'][] = 'path/template';

in a preprocess function to override the default theme defined in hook_theme is considered an invalid use of D6 theme API. The cited patch removes the '/' and thus the discovery code fails to find the template file. The override theme is not defined in hook_theme.

Comments

dvessel’s picture

One way around this is to use HOOK_theme_registry_alter(). Target the hook and add in the path to your alternate template through the "theme paths" key. It must be added *right after* the path leading to the module path that originally implements the hook.

solotandem’s picture

dvessel: I added to the theme paths using the indicated hook. The template override works again. Thanks.

solotandem’s picture

Status: Active » Fixed

Accommodate core patch #396224: SA-CORE-2009-003 - Local file inclusion on Windows not allowing $variables['template_files'] in preprocess functions to include a path reference (e.g. module subdirectories).

Fixed in tonight's dev release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.