This has also been reported here: http://drupal.org/node/1738564
The maintenance mode page fails to display and the site crashes in a WSOD if the current theme has a region named 'user'. It looks like there's a conflict in theme.inc since it's confusing the $user object with a user region:
Recoverable fatal error: Object of class stdClass could not be converted to string in template_preprocess_maintenance_page() (line 2708 of theme.inc).
Line 2708:
isset($variables[$region]) ? $variables[$region] .= $region_content : $variables[$region] = $region_content;
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal-1809136-2.patch | 1.03 KB | tim.plunkett |
Comments
Comment #1
joelrosen commentedComment #2
tim.plunkett_template_preprocess_default_variables() adds $variables['user'] for every template and theme function.
Here's a possible fix, but this might just be "works as designed" and add some docs saying "don't do that".
Comment #4
barrapontoWhat if we namespace the regions into an array like $page['REGION_NAME'] or maybe even $regions['REGION_NAME']? After all, regiona names will clash with any variable name in maintenance-page.tp.php, right?
Comment #5
lauriiiMaybe we could simply trigger warning in case someone creates region with machinename 'user'
Comment #6
lauriiiOr maybe not. The solution by Tim looks better.
Comment #15
pameeela commentedThis code has changed a lot. I will manually test it when I get a chance, marking postponed until we know whether it's still valid.
Comment #18
quietone commentedMore information about this issue was asked for in 1 year ago an no additional information has been supplied, therefor closing.
If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!