If an uncaught exception is triggered on node/123, the maintenance page is displayed. If this happens in the admin section, I get the following error:
Warning: include(/home/chsc/www/drupal7/includes/maintenance-page.tpl.php): failed to open stream: No such file or directory in /home/chsc/www/drupal7/includes/theme.inc on line 1145
The reason is the following array returned by hook_theme() in the system module:
'maintenance_page' => array(
'arguments' => array('content' => NULL, 'show_blocks' => TRUE, 'show_messages' => TRUE),
'template' => 'maintenance-page',
'path' => 'includes',
'file' => 'theme.maintenance.inc',
),
'path' indicates that the .inc file is in the includes directory. However, the default implementation of the template resides in system/module/maintenance-page.tpl.php, i.e. in another directory. Garland has its own version of maintenance-page.tpl.php, but Seven does not, and that is why it fails.
One solution is to simply move either the template file or the include file, but I guess it is reasonable enough to wish to have these files in two different directories.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | theme-8.patch | 16.99 KB | c960657 |
| #21 | theme-7.patch | 16.81 KB | c960657 |
| #19 | theme-6.patch | 17.8 KB | c960657 |
| #17 | theme-5.patch | 17.79 KB | c960657 |
| #14 | theme-4.patch | 17.81 KB | c960657 |
Comments
Comment #1
c960657 commentedThis patch splits hook_theme's
pathintofile pathandtheme path.Comment #2
c960657 commentedThis patch is redundant if #310467: Slimmer hook_theme() is fixed and the proper files are loaded via the registry, though there is some work in progress in #497118: Remove the registry (for functions) with the purpose of removing functions from the registry.
Comment #4
c960657 commentedReroll.
Comment #5
c960657 commentedComment #7
c960657 commentedComment #9
c960657 commentedReroll.
Comment #10
c960657 commentedComment #12
c960657 commentedComment #14
c960657 commentedReroll.
Comment #15
drewish commentedsubscribing. running into this.
Comment #17
c960657 commentedReroll.
Comment #19
c960657 commentedReroll.
Comment #21
c960657 commentedTurns out the problem with the maintenance page was a duplicate of #321828: maintenance_page not registered correctly in drupal_common_theme() that was just fixed. The change suggested here may still be useful, though. Rerolling.
Comment #23
c960657 commentedReroll.
Comment #25
tstoecklerMoving this to Drupal 8.
There has been no activity for a year, and it seems the original bug report was fixed in the meantime (#21), so, while definitely being useful, this sounds more like a feature now.
Comment #26
jhedstromGiven the inactivity, and the fact that the actual error was fixed in #321828: maintenance_page not registered correctly in drupal_common_theme(), I'm closing this out as a duplicate.