Skip to main content
John Brandenburg

Main navigation

  • Home
  • About Me
  • Tech
  • Voting Rights
    • Close Polling Stations:
    • Reject Absentee Ballots
    • 482,000 de-registered voters in Wisconsin since 2016
    • Deceptive Practices by poll workers
    • Gerrymandering
    • Lack of Early Voting
    • Purge Voters
    • Removing Voting Rights from Former Felons
    • Unreliable Voting Equipment
    • Voter ID Laws
User account menu
  • Log in

Breadcrumb

  1. Home

Paint it black - Dark Mode Errors in Drupal

By John, 11 April, 2025
Image
An error message on a dark background with red text.

I'm a fan of dark modes on everything. Yes, I know this site doesn't currently use a dark theme, it's just the default "Olivero" theme at the moment, but I've struggled to find good, off the shelf themes good for a small blog.  Anyway, I just wanted to post about an issue I filed against Drupal core, requesting a feature to allow it to use the php config's "error_prepend_string" and "error_append_string" configs. This could radically change the infamous "White screen of death" you frequently see when debugging drupal websites. This can be much easier on the eyes, and even improve the accessibility for people with visual limitations. 

Well, turns out this isn't that straightforward. For any "Fatal" php errors, e.g. syntax errors, or calling undefined functions, you will get Drupal core's error handler. While any uncaught exceptions, the symfony error will be used. So we need to use two different approaches. I created a small module here , and with a patch from this issue, you can get Drupal to use the "error_prepend_string" directive from php, where you can add your custom error styles. 

 

 

RSS feed
Powered by Drupal