Magic tabs causes white screen 500 error

jmunning - June 12, 2009 - 21:36
Project:Magic Tabs
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi there,

I have magic tabs working on my dev site but it is breaking my production site. In template.php I have the following:

function magic_tabs_my_callback($active = 0) {
    //$view = views_get_view('NavigationMM');
//'15' is the number of results displayed per page
  $tabs[] = array(
    'title' => t('Popular'),
    'content' => theme('view', 'NavigationMM_popular', '15', NULL, 'block'),
  );
  $tabs[] = array(
    'title' => t('Recent'),
    'content' => theme('view', 'NavigationMM_recent', '15', NULL, 'block'),
  );

  return $tabs;
}

Which causes a white screen and eventually a PHP stack overflow error

THis code works fine:

function magic_tabs_my_callback($active = 0) {
    //$view = views_get_view('NavigationMM');
//'15' is the number of results displayed per page

  $tabs[] = array(
    'title' => t('First magic tab'),
    'content' => t('Content of first magic tab'),
  );
  $tabs[] = array(
    'title' => t('Second magic tab'),
    'content' => t('Content of the second magic tab'),
  );

  return $tabs;
}

Any ideas what might be giving me trouble?

Thanks.

#1

jmunning - June 12, 2009 - 22:22
Title:Magic tabs causes white screen and PHP stack overflow error» Magic tabs causes white screen 500 error

It looks like the white screen is a 500 error. And the php stack overflow problem isn't happening now that I am not redirecting to the view. The strange thing is that it happens on the production server but not the dev server. Maybe this is a php configuration issue?

#2

jmunning - June 12, 2009 - 22:31

Well, checked the phpinfo() for both servers and there doesn't appear to be a difference which would affect things...

#3

jmunning - June 15, 2009 - 09:21
Category:support request» bug report

After many hours of troubleshooting I found that this error only happens when trying to use magic tabs to load views that were imported. When I recreated the views manually, the error disappeared. Two separate imported views gave me the same problem.

 
 

Drupal is a registered trademark of Dries Buytaert.