Question: I have a Drupal multisite website, with Apache Solr Search Integration, which is up and running very well in the live server. I am trying to replicate the same website, on another server to use it as a development environment. I have copied all the code and replicated the DB and changed the settings.php file accordingly, but I am getting the following errors.

* Memeber profile is not completed.
* Apache solr is not integrated on to the server.

Can anyone help me with the steps which I have to follow during the process?

Answer: 
It turns out that I need a combination of changes:

I had to implement `hook_form_alter()`in a module and set the form's `#theme` property:

```
function mymodule_form_user_register_form_alter(&$form, &$form_state, $form_id) {
  $form['#theme'] = 'user_register';
}

```

And then in template.php:

```
function mytheme_theme($existing, $type, $theme, $path){
  return array(
    'user_register' => array(
      'render element' => 'form',
      'template' => 'templates/user-register',
    ),
  );
}

function mytheme_preprocess_user_register(&$variables) {
  $variables['rendered'] = drupal_render_children($variables['form']);
}

```

And then I added user-register.tpl.php with my desired markup, and 

```
<?php echo $rendered; ?> 

```

to print the form.
The definition of the theme function given from the implementation of [hook\_theme()](http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_theme/7) is wrong:

* In Drupal 7, the array index "arguments" is not used anymore; you should use "render element" (as in this case), or "variables."
* The theme function receive a different argument, in Drupal 7, which is `&$variables`; in your case, you should use `$form = $variables['form']`, once you defined the theme function using the array index I reported in the previous point. See what done in [theme\_locale\_date\_format\_form()](http://api.drupal.org/api/drupal/modules--locale--locale.admin.inc/function/theme_locale_date_format_form/7) (the theme function used for the form defined by [locale\_date\_format\_form()](http://api.drupal.org/api/drupal/modules--locale--locale.admin.inc/function/locale_date_format_form/7), which is defined in [locale\_theme()](http://api.drupal.org/api/drupal/modules--locale--locale.module/function/locale_theme/7), or in [theme\_status\_report()](http://api.drupal.org/api/drupal/modules--system--system.admin.inc/function/theme_status_report/7), which is defined in [system\_theme()](http://api.drupal.org/api/drupal/modules--system--system.module/function/system_theme/7).