drupal_common_theme() should explicitly add the file include/theme.maintenance.inc when registering 'maintenance_page', because template_preprocess_maintenance_page() is in that (conditionally included) file.
The test for this is: apply #243532: Catch notices, warnings, errors and fatal errors from the tested side, run the "Simpletest functionality" test, and see the beautiful notices from the tested site.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 321828-maintenance-page-4.patch | 9.91 KB | davyvdb |
| #13 | 321828-maintenance-page-3.patch | 10.89 KB | davyvdb |
| #11 | 321828-maintenance-page-2.patch | 10.49 KB | davyvdb |
| #10 | 321828-maintenance-page-2.tpl_.php.txt | 10.49 KB | davyvdb |
| #8 | 321828-maintenance-page.tpl_.php.txt | 5.43 KB | davyvdb |
Comments
Comment #1
webchickFix looks good, but we don't define arrays that way. :) (Except for 'arguments' which I guess is to make it look more like a function signature).
Changed the patch to put each key on its own line and committed. Thanks!
Comment #3
merlinofchaos commentedThis is broken. Right now the theme system does not accept having a template and a specified file containing a preprocess function in different directories. The 'path' is used for both.
Comment #4
merlinofchaos commentedThere are 3 possible solutions:
1) move theme.maintenance.inc into system as system.maintenance.inc
2) move the template to includes
3) split 'path' so that we can have a template path and a file path.
Solution 2 is clearly the weakest.
Solution 1 is probably the easiest.
Solution 3 could solve a few other issues, but I think would lead to a larger re-org, because we would almost certainly move all core templates into one directory (which would still leave module's templates out in the cold but what can you do?)
Comment #5
johnalbinBTW, if you want to see the bug, set the Stark theme as your maintenance theme in settings.php. You'll get a blank page because it tries to look in "includes" for the maintenance-page.tpl.php file.
Comment #6
davyvdb commentedComment #7
davyvdb commentedThis extremely easy patch that sets the admin theme on /batch fails because of this http://drupal.org/node/563634
The maintenance-page is in system.module and the theme function is in theme.inc. How can we solve this?
Comment #8
davyvdb commentedThis seems to solve this on my local machine.
Comment #9
damien tournoud commentedWell this patch simply remove the maintenance page theme ;)
Comment #10
davyvdb commentedWrong patch. That was weird.
Comment #11
davyvdb commentedOf course a patch extension is needed. Ouch.
Comment #13
davyvdb commentedComment #14
davyvdb commentedComment #15
pasquallethis change should not be in the patch
please use only 1 empty line between functions
Comment #16
davyvdb commentedComment #17
roychri commentedThis fixes the problem for me.
Comment #18
webchickCommitted to HEAD! Thanks! I will be so happy for those phantom errors about this file being missing to go away. :)