Closed (fixed)
Project:
Drupal core
Version:
4.7.0-beta3
Component:
base system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jan 2006 at 14:27 UTC
Updated:
7 Mar 2006 at 09:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
Eglish commentedIf there is no theme, then you see an unstyled page-which still has links on it.
Only case I can think of would be if you're using a 4.6 module to give yourself a menu (and disabled the default one), then when you upgraded you broke the 4.6 module which broke all (only) menu(s).
If the above case is true, I don't think there's very much that can done to fix this.
Comment #2
thierry_gd commentedThe solution would be to set by default the theme "bluemarine" which is part of the drupal package. By the way it is the one which is by default when you do a fresh install.
The update.php should in case of an update :
* check if the theme specified in the DB is one of the one bring with drupal ==> if it not the case set it by default to "bluemarine" else do nothing
The thing is that when, you want to do a clean install you first update drupal and only after yoou install the extra modules and themes.
I will see if I find the way to correct this problem, but I am not familiar with all the source files, so if someone find before me ;)
Comment #3
thierry_gd commentedHi, I fixed the problem, and test it : I upgrade from drupal 4.6 to 4.7 beta 3 several times, it work as expected.
Hope, someone will be able to commit it soon to the CVS (I don't have any CVS access) !
To fix that problem, replace in the file updates.inc the code :
//begin code
function system_update_145() {
$default_theme = variable_get('theme_default', 'bluemarine');
$ret = array();
.....
//end code
by the following code :
//Begin code
function system_update_145() {
$default_theme = variable_get('theme_default', 'bluemarine');
$themes = list_themes();
if (!array_key_exists($default_theme, $themes)) {
variable_set('theme_default', 'bluemarine');
$default_theme = 'bluemarine';
}
$ret = array();
.....
//End code
This patch code, will check if your default_theme written in the DB exist in the filesystem, if not then it will set default_theme to "bluemarine" which come by default with drupal.
It work perfectly : you can now to a blank upgrade and after finishing upgrading the core you can add one by one your optionnal modules and themes.
Comment #4
dries commentedPlease provide a real patch. Thanks!
Comment #5
thierry_gd commentedPatch created and tested
Update the file updates.inc in the directory database.
Comment #6
thierry_gd commentedComment #7
dries commentedIn updates.inc there is an update:
I think it no longer works as intended. I don't quite understand what it does, or why it is supposed to be there. It might be related to the problem you observed. Maybe this is where you new code belongs?
Comment #8
chx commentedIt could be system_theme_data() , it refills the system table with the new formatted theme data.
Comment #9
dries commentedGoing to change the status of this bug so we can ponder about this some more. Hopefully, someone can investigate this some more. Thanks in advance.
Comment #10
thierry_gd commentedHi,
I have been checking about the purpose of system_update_156 ==> don't seem to have nothing to do with the problem I observed. The code in that function need to be optimised, it seem to have some dead code in it ! ==> I will look on how to clean it when I find time (some MBA exams in a few days so not much time to do it immediatly), but it don't affect the patch I submitted.
I tested again a few times the patch I submitted ==> works perfectly ==> can be apply !
Comment #11
dries commentedCommitted to HEAD. Thanks.
Comment #12
(not verified) commented