Index: simplenews.module =================================================================== RCS file: /cvs/drupal/contributions/modules/simplenews/simplenews.module,v retrieving revision 1.215 diff -u -r1.215 simplenews.module --- simplenews.module 30 Sep 2009 14:10:20 -0000 1.215 +++ simplenews.module 14 Oct 2009 04:48:40 -0000 @@ -1553,6 +1553,16 @@ // Check if this node-language pair has been buffered. // If not, build the message and store it for later use. if (!isset($messages[$nid][$langcode])) { + // Temporarily set admin theme to NULL. + // This is done to prevent a problem where sites with an + // Administration Theme set to a theme other than the default theme + // fail to recognize default theme template over-ride files, for + // example, simplenews-newsletter-body.tpl placed in the default theme directory + // is ignored in favor of the stock simplenews-newsletter-body.tpl. + global $custom_theme; + $save_theme = $custom_theme; + $custom_theme = NULL; + $node = drupal_clone($context['node']); // Add simplenews specific header data @@ -1599,6 +1609,8 @@ $footer = theme(array('simplenews_newsletter_footer__'. $context['node']->simplenews['tid'], 'simplenews_newsletter_footer'), $context['node'], $key, $message['language']); $messages[$nid][$langcode]['footer'] = $footer; + // Restore previously set Administration Theme (see comment above) + $custom_theme = $save_theme; } else { // Get message data from buffer