I am trying to subtheme Commerce Kickstart Admin Theme. I have copied all the folders and files to sites/all/themes/my__admin_subtheme, and changed the appropriate lines in my_admin_subtheme.info.
When I go to /admin/appearance, and change the section Administration theme to My Admin Theme, I get an error in template.php telling that the function commerce_kickstart_admin_preprocess_maintenance_page is declared twice.
How to solve this issue?
Edit:
When I change the name of preprocess function in template.php from commerce_kickstart_admin_preprocess_maintenance_page to my_admin_subtheme_preprocess_maintenance_page or delete template.php the fatal error disappear but I lose the formated html present in that function.
To make things more clear, the template.php is
<?php
/**
* Override or insert variables into the maintenance page template.
*/
function livraria_acervo_admin_preprocess_maintenance_page(&$vars) {
// While markup for normal pages is split into page.tpl.php and html.tpl.php,
// the markup for the maintenance page is all in the single
// maintenance-page.tpl.php template. So, to have what's done in
// shiny_preprocess_html() also happen on the maintenance page, it has to be
// called here.
shiny_preprocess_html($vars);
if (variable_get('install_task') != 'done') {
$footer_markup = '<div class="message">' . t('Proudly built by') . '</div>';
$footer_markup .= '<div class="logo">' . t('<a href="@url">Commerce Guys</a>', array('@url' => 'http://www.commerceguys.com')) . '</div>';
$vars['footer'] = array(
'#prefix' => '<div id="credit" class="clearfix">',
'#markup' => $footer_markup,
'#suffix' => '</div>',
);
}
}
I searched for that function in all file tree in root Drupal installation and didn't find any call for that function.
I see the function is related to the maintenance mode, the mode that I'm working now. Well, as I told above the fatal error disappeared but how to know where the function is called. I think the function is called somewhere and I would have to change the name in the file(s) that it's called, although I don't think this would the better way to solve the problem.
So some piece is missing in subtheming Commerce Kickstart 2 admin theme, and is related to the call of that function commerce_kickstart_admin_preprocess_maintenance_page.
I'm new to Drupal and have not practiced php very much, so I hope I have been cleared. If more information is needed please tell me. And sorry about my English too.
Thanks in advance!