@@ -580,8 +580,10 @@ function theme() {
$info = $hooks[$hook];
global $theme_path;
$temp = $theme_path;
- // point path_to_theme() to the currently used theme path:
- $theme_path = $hooks[$hook]['theme path'];
+ // point path_to_theme() to the currently used theme path when not in preview mode:
+ if ($hook != 'node_preview') {
+ $theme_path = $hooks[$hook]['theme path'];
+ }
// Include a file if the theme function or preprocess function is held elsewhere.
if (!empty($info['file'])) {