We're using a custom theme and the error pages (both default and custom) used to work fine until I began making some modifications to my theme. Now, they return a completely blank page (WSOD). No errors on the screen or in the Apache log. The Drupal log shows the 404's and 403's, and the HTTP response headers are reporting the correct error code, but no HTML is outputted. I can load the custom error pages themselves just fine.

And it is important to mention that the error pages are working fine in Garland.

Any ideas? I've made too many changes to keep track of and report here. However, one major change is that I've added a sub-theme to my custom theme. Though, I did try disabling it with no effect on the error page problem.

Comments

cschults’s picture

I'm wondering if this is a memory issue, but why are the errors pages working themselves when requested directly???

cschults’s picture

I think I've isolated the problem.

At the end of drupal_not_found() there is this: print theme('page', $return, FALSE);

I can see that $return has the content of the node designated as my custom 404.

The last line of theme() is: return $output;

If I change this to "print $output", I can see the 404 content (albeit without my theme being applied).

So it seems theme() is not successfully returning $output or drupal_not_found() is choking.

cschults’s picture

I was mistaken. The content I was seeing was when the node template was being processed. A little further digger reveals that theme_render_template() is being processed and returning nothing when the $template_file variable is set to my page.tpl.php template. Not sure why.

cschults’s picture

In the theme_render_template() function call, it looks like Drupal is choking on this line that includes my page.tpl.php template:

include "./$template_file";

Any ideas on how to troubleshoot?

cschults’s picture

Looks like a single line in my page.tpl.php file is causing the problem. It is a virtual() function call that includes another file that has a lot of Apache SSI elements, including several flastmod elements.

However, not sure why it only causes a problem on the error pages???