Save $50 on Dreamhost Hosting - Any Plan

As a preferred visitor, you can get $50 off of any Dreamhost hosting plan by using coupon code CWD50 when you check out, for a limited time. Dreamhost is a reliable hosting provider with solid customer service and a proven track record.

Constant Contact E-Newsletter Service - get 60 days free!

Constant Contact has been in business since 1996 is one of the most reliable and trusted email marketing services around. Click here to activate your free 60 day trial courtesy of CWD Community.



May 31 2007

Drupal - Blank Screen After Submit


Filed under: Content Management Systems » Drupal,
Tools:


Are you getting blank (white) screens in Drupal?

This is a common problem that begins to occur when you edit core/ theme/ template files and leave in invalid characters, or spaces where they shouldn't be.

A common place for this to occur is in your theme's template.php file.  Check to make sure there is no space after your ending ?>

If that doesn't fix it do a mass search for a space at the end of the last character for all your files.  Finally, back up your template.php file and complete delete it from your theme directory and see if you still get the blank screen.  If you don't, you've narrowed down the problem to your template.php file - maybe a function you ported over from an old site that no longer applies.

If that still doesn't solve your problem you may need to increase your php memory limits.  Consult your hosting provider for how to do this.

Average: 4.5 (6 votes)
Tools:



Thanks a lot!

I think it's a good idea not to put ?> at the end of template.php file!

Same Problem

I had used Drupal 5.x site worked in online, but I download and worked in local, but while the button submit it displays only empty page..

1. I clears all the cache table and also the browser's cache.
2. I increased the memory limit also in php.ini file also, same problem occurred, kindly give the solution.

Regards Manikandan.T

trouleshooting template.php

Look at the error_log of your web server. It will reveal all problems.

I just do this:

prompt# tail -f error_log

Output is something like this:

[Sun Nov 29 23:03:20 2009] [error] [client 209.173.84.19] PHP Parse error: syntax error, unexpected '[', expecting T_STRING in /var/www/vhosts/example.com/httpdocs/themes/zen/zen_ninesixty/template.php on line 278

Find out what the syntax error (or other) is on line 278 and you've fixed it!

Joe

Blank page

I tried all the above possibilities. It's not working. Any other ways please tell!

A less subtle approach

A less subtle approach is to move the theme out of the themes folder or chmod 000 it, forcing Drupal to use another theme. I've had to do this a couple times when dealing with multisite installs or playing with experimental themes.

The fix to blank Drupal screen

People - if you're getting blank Drupal screens, do this:

- Upgrade Drupal
- Clear out your database cache using the following:

For Drupal 4.x and lower:
truncate table cache;

For Drupal 5.x and higher:
truncate table cache;
truncate table cache_filter;
truncate table cache_menu;
truncate table cache_page;

Clear out your browser cache and reload your page using force refresh (Ctrl + F5 key). If that doesn't solve it, you may need to simply start over from scratch, and then re-import your data.

Drupal Web Developer

Drupal Theme Developer, is a best Drupal Theme web developing firm in India. We build affordable web for best price. We develop Drupal projects for any web and web pages. We do Drupal, outsourcing projects, PHP & MySQL outsource web development.

Links removed from comments

And you wonder why people bother to post their comments on an unrelated page. People - if you post spam your links will be stripped. If the content is completely irrelevant your post will simply be removed.

Oh, thanks a lot!

Thanks a lot! I just spent the whole week trying to find out my problem (after I upgraded my site from Drupal 5 to 6 - I only saw blank screens on every page, using my custom themes, while the default theme, Garland, was working fine).

Now, I've just realized that it happened because of some old functions in template.php.

Thanks again!!!!!!!!

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <br />
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

CAPTCHA
This question is used to make sure you are a human visitor and to prevent spam submissions.