If your database goes away, mothership as a maintenance theme throws lots of PHP include warnings:
Warning: include_once(.//template/template.functions.php): failed to open stream: No such file or directory in /var/www/drupal6-wrap-3055/sites/all/themes/mothership/template.php on line 16
...
This is because drupal_get_path() won't work if there's no system table.
A quick workaround is to check db_is_active() and use dirname(__FILE__) instead if the database is dead for any reason.
Please find attached a patch implementing this.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1119400-mothership-maintenance-offline-patch.3.txt | 1.54 KB | jp.stacey |
| #1 | 1119400-mothership-maintenance-offline-patch.2.txt | 1.54 KB | jp.stacey |
| mothership-maintenance-offline-patch.1.txt | 1.46 KB | jp.stacey |
Comments
Comment #1
jp.stacey commentedRe-rolled so we use an unambiguous name for the mothership path directory variable.
Comment #2
jp.stacey commentedGetting a malformed patch from this one, so just re-rolled it: attached.
Comment #3
realityloop commentedIf this is still an issue in D7 please re-open and update the version in issue metadata