this theme cannot be used in site off-line mode when database is not working

mattyoung - February 15, 2009 - 02:19
Project:Theme Settings API
Version:6.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The problem is in template.php line 22, variable_set()is called. In site off-line mode, db is not available and variable_set() result in error.

#1

Alan Cooney - July 8, 2009 - 07:38
Project:AD Blueprint» Theme Settings API
Version:6.x-2.6» 6.x-1.4

This is general theme_settings code - http://drupal.org/node/177868

Moved to the theme settings module.

Alan

#2

Alan Cooney - July 8, 2009 - 07:39

To add; personally I can't replicate this.

Alan

#3

mattyoung - July 8, 2009 - 20:21
Title:this theme cannot be used in site off-line mode» this theme cannot be used in site off-line mode when database is not working

>I can't replicate this

I suspect you are not turn off the database to trigger the maintenance screen. You need to get the maintenance screen to say "Due to technical problem". Not the one that says "Site in maintenance"

To replicate this problem:

1) set "AD Blueprint" as maintenance_theme
2) Shut off you database. Don't just put the site in "Maintenance mode" because in that case, the database is still functioning. The easiest way to shut off database is go in settings.php and put a wrong password in '$db_url'.

Theme should never read/write to database directly. They should only use variables handed to them from preprocess functions.

I've changed the title to be precise about this error condition.

 
 

Drupal is a registered trademark of Dries Buytaert.