Drupal Tips: How to fix White Screen of Death (WSODs) on form submit
A white screen shows up while submitting a form in your Drupal Site?
There could be many possible causes for WSODs (White Screen of Death) in Drupal, such as PHP error reporting settings, memory exhaustion, etc. If the exact reason could be figured out, fixing becomes much easier.
For treating this specific WSOD issue on form submit, check for the following symptoms:
- WSOD appears while submitting forms but page loads after refresh.
Go to Admin-menu > Reports > Recent log entries and check for the the following error:
"Cannot modify header information - headers already sent by (output started at … "
If the above symptom exists try the following remedy:
- Check for whitespace and non-printable characters existing outside of php tags, because they cause output and headers are sent unexpectedly.
- Remove white spaces and non-printable characters.
Best practices to avoid white spaces and non-printable characters in Drupal:
- Follow Drupal coding standard to not include the closing ?> on a PHP file.
- Turn off 'Include Unicode Signature (BOM)' option turned on in your editor.
For more information on how to deal with WSODs on your drupal site, visit drupalwsod.com.