Warning: Invalid argument supplied for foreach() in theme_links() (line 1810 of /includes/theme.inc).

When you get this Warning with a sub-theme change this text in template.php (https://www.drupal.org/project/responsive/issues/1820574)

In Theme:

if (isset($vars['main_menu'])) { $vars['main_menu_links'] = $vars['main_menu']; $vars['main_menu'] = theme('links__system_main_menu', array( 'links' => $vars['main_menu_links'], 'attributes' => array( 'class' => array('links', 'main-menu', 'clearfix'), ), 'heading' => array( 'text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'), ) )); } else { $vars['main_menu'] = FALSE; }

In the sub theme change to:

if (isset($vars['main_menu_links'])) { $vars['main_menu'] = theme('links__system_main_menu', array( 'links' => $vars['main_menu_links'], 'attributes' => array( 'class' => array('links', 'main-menu', 'clearfix'), ), 'heading' => array( 'text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'), ) )); }

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.