Last updated March 25, 2011. Created by JohnAlbin on February 23, 2011.
Edited by Christopher Jam.... Log in to edit this page.
Upgrading Zen from 5.x-1.0 to 5.x-1.1…
If you followed the directions for creating a sub-theme, you will NOT have edited any files in the root of Zen and should only have modified files in your sub-theme's directory. So upgrading to the latest Zen will be easy.
- If you are replacing the Zen theme on a live server, place your site in maintenance mode.
- Download the latest Zen from http://drupal.org/project/zen
- Rename the zen folder in your Drupal installation to zen-old.
- Unpack the downloaded file and place the new zen folder in your Drupal installation next to your zen-old folder.
- Move your custom sub-theme folders from zen-old/ to zen/.
- Delete the zen-old folder. (Or at least move it out of the Drupal installation directory.)
- Turn off maintenance mode.
- To complete the upgrade, edit the following items in your sub-theme:
#199682: 'Submitted by' text is shown for content even if setting is disabled
Edit your sub-theme’s theme-settings-init.php files and change:
<?php
// Save default theme settings
variable_set(
str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
array_merge($defaults, theme_get_settings($theme_key))
);
?>to:
<?php
// Get default theme settings.
$settings = theme_get_settings($theme_key);
// Don't save the toggle_node_info_ variables.
if (module_exists('node')) {
foreach (node_get_types() as $type => $name) {
unset($settings['toggle_node_info_' . $type]);
}
}
// Save default theme settings.
variable_set(
str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
array_merge($defaults, $settings)
);
?>#248780: admin table styles override update_status styling
Edit your subtheme.css and change:
div.warning, tr.warningtodiv.warning, tr.warning, body.section-admin tr.warningdiv.error, tr.errortodiv.error, tr.error, body.section-admin tr.error- all
.section-admin #content …declarations to.section-admin …declarations.
#246110: zen.css breaks .container-inline
Edit your subtheme.css and, just before the .tips declaration, add:
.container-inline div, .container-inline label /* Inline labels and form divs */
{
display: inline;
}#247960: Add THEME_preprocess() hook to Zen
Edit your sub theme’s template.php file and add:
/**
* Override or insert PHPTemplate variables into all templates.
*
* @param $vars
* A sequential array of variables to pass to the theme template.
* @param $hook
* The name of the theme function being called (name of the .tpl.php file.)
*/
/* -- Delete this line if you want to use this function
function STARTERKIT_preprocess(&$vars, $hook) {
$vars['sample_variable'] = t('Lorem ipsum.');
}
// */Upgrading Zen from 5.x-1.0-beta1 or later to 5.x-1.0
If you followed the directions for creating a sub-theme, you will NOT have edited any files in the root of Zen and should only have modified files in your sub-theme's directory. So upgrading to the latest Zen will be easy.
- If you are replacing the Zen theme on a live server, place your site in maintenance mode.
- Download the latest Zen from http://drupal.org/project/zen
- Rename the zen folder in your Drupal installation to zen-old.
- Unpack the downloaded file and place the new zen folder in your Drupal installation next to your zen-old folder.
- Move your custom sub-theme folders from zen-old/ to zen/.
- Optionally, compare the files in zen/STARTERKIT/ with the files in zen-old/STARTERKIT (or old/SUBTHEME if you have one.) If you see any changes, you can apply them to your custom sub-themes.
- Delete the zen-old folder. (Or at least move it out of the Drupal installation directory.)
- Turn off maintenance mode.
Upgrading Zen from a version before 5.x-1.0-beta1
Upgrading a theme that you have modified can only be accomplished by looking at each file and carefully merging the files from the latest Zen into your theme. This is such a pain in the ***, that Zen 5.x-1.0-beta1 was specifically designed to be easily updatable.
Good luck. You’re going to need it.