0

I understand this to be two declarations of the same function, which is not allowed. But how to fix this?

Everything was fine until I started to enable the MailChimp module, then the backend has this fatal error:

Fatal error: Cannot redeclare casa_views_post_execute() (previously declared in /home/kansascasa/public_html/sites/all/themes/casa/template.php:26) in /home/kansascasa/public_html/sites/all/themes/casa_m/template.php on line 80

This is the code:

    function casa_views_post_execute(&$view) {
    watchdog('theme', print_r($view->result[0], true));
  if ($view->name == 'programs2' && !empty($view->result)) {
    //drupal_goto('node/' . $view->result[0]->nid);
  }
}

Second one:

function casa_views_post_execute(&$view) {

}

What is the fix for this? Appreciate your help in advance.

0

I'm assuming you have two separate themes. Perhaps the theme in the casa_m directory is a subtheme?

If the machine name of the theme in the /case_m/ directory is casa_m , then change the function name to casa_m_views_post_execute(&$view)

  • Yes, that is correct. Thanks so much, I will try this. – CodeChick Jun 11 '18 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.