Fatal error after subtheming Commerce Kickstart Admin Theme 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

&lt;?php

/**
 * Override or insert variables into the maintenance page template.
 */
function livraria_acervo_admin_preprocess_maintenance_page(&amp;$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 =  '&lt;div class="message"&gt;' . t('Proudly built by') . '&lt;/div&gt;';
    $footer_markup .=  '&lt;div class="logo"&gt;' . t('&lt;a href="@url"&gt;Commerce Guys&lt;/a&gt;', array('@url' =&gt; 'http://www.commerceguys.com')) . '&lt;/div&gt;';
    $vars['footer'] = array(
      '#prefix' =&gt; '&lt;div id="credit" class="clearfix"&gt;',
      '#markup' =&gt; $footer_markup,
      '#suffix' =&gt; '&lt;/div&gt;',
    );
  }
}


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!
PHP requires all function names to be unique*, you'll need to rename the functions in your sub-theme to my_admin_subtheme_FUNCTION_NAME, e.g. my_admin_subtheme__preprocess_page(&amp;$vars).

You might want to consider clearing the template.php file completely and only copying the functions you need when you find you need them.


That is unique in a namespace, but that is another subject - see http://php.net/manual/en/language.namespaces.php.