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.

Comments

c960657’s picture

Status: Active » Needs review
StatusFileSize
new18.58 KB

This patch splits hook_theme's path into file path and theme path.

c960657’s picture

This 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.

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

StatusFileSize
new19.3 KB

Reroll.

c960657’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

StatusFileSize
new19.25 KB

Reroll.

c960657’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review
Issue tags: +API change
StatusFileSize
new17.81 KB

Reroll.

drewish’s picture

subscribing. running into this.

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review
StatusFileSize
new17.79 KB

Reroll.

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review
StatusFileSize
new17.8 KB

Reroll.

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review
StatusFileSize
new16.81 KB

Turns 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.

Status: Needs review » Needs work

The last submitted patch failed testing.

c960657’s picture

Status: Needs work » Needs review
StatusFileSize
new16.99 KB

Reroll.

Status: Needs review » Needs work

The last submitted patch failed testing.

tstoeckler’s picture

Version: 7.x-dev » 8.x-dev

Moving 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.

jhedstrom’s picture

Issue summary: View changes
Status: Needs work » Closed (duplicate)

Given 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.