Title: Widgets problem
Last modified: August 19, 2016

---

# Widgets problem

 *  Resolved [sparkblog](https://wordpress.org/support/users/sparkblog/)
 * (@sparkblog)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/widgets-problem-4/)
 * my website, using the “mystique” theme has had some issues for a long while now,
   something i am not familliar with at all, and i was wondering wether anyone could
   tell me what the following means?
 * Fatal error: Nesting level too deep – recursive dependency? in /mnt/w1009/d42/
   s05/b02dc22a/www/bunglist.com/sparkblog/wp-includes/widgets.php on line 924
 * any ideas?
    thanks SparkBlog

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [bunglist](https://wordpress.org/support/users/bunglist/)
 * (@bunglist)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329739)
 * The problem is in widgets.php
 *     ```
       function is_active_widget($callback = false, $widget_id = false, $id_base = false, $skip_inactive = true) {
       	global $wp_registered_widgets;
   
       	$sidebars_widgets = wp_get_sidebars_widgets();
   
       	if ( is_array($sidebars_widgets) ) {
       		foreach ( $sidebars_widgets as $sidebar => $widgets ) {
       			if ( $skip_inactive && 'wp_inactive_widgets' == $sidebar )
       				continue;
   
       			if ( is_array($widgets) ) {
       				foreach ( $widgets as $widget ) {
       					if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && _get_widget_id_base($widget) == $id_base ) ) {
       						if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
       							return $sidebar;
       					}
       				}
       			}
       		}
       	}
       	return false;
       }
       ```
   
 * **Original:**
    Line 924-925 (widgets.php):
 *     ```
       if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] == $callback ) || ( $id_base && _get_widget_id_base($widget) == $id_base ) ) {
           if ( !$widget_id || $widget_id == $wp_registered_widgets[$widget]['id'] )
       ```
   
 * From [what this guy said about the “Nesting level too deep – recursive dependency” error](http://www.richardlord.net/blog/php-nesting-level-too-deep-recursive-dependency)
   I switched the comparison operators in the if statements (lines 924 and 925) 
   from non-strict (==) to strict (===) and it reduces the amount of objects being
   checked to those of the same type, so all of the widgets now show up in widgets.
   php and no more error.
 * **Fix:**
    Line 924-925 (widgets.php): Replace the three non-strict comparison
   operators (==) with strict (===). _Third replacement, line 925, may not be necessary_
 *     ```
       if ( ( $callback && isset($wp_registered_widgets[$widget]['callback']) && $wp_registered_widgets[$widget]['callback'] === $callback ) || ( $id_base && _get_widget_id_base($widget) === $id_base ) ) {
           if ( !$widget_id || $widget_id === $wp_registered_widgets[$widget]['id'] )
       ```
   
 *  Thread Starter [sparkblog](https://wordpress.org/support/users/sparkblog/)
 * (@sparkblog)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329743)
 * Thanks bung, all fixed and ready to go 😀
 *  [currye](https://wordpress.org/support/users/currye/)
 * (@currye)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329753)
 * My widgets are stuck and I downloaded widgets reset they are still I change themes,
   deactived all plugins and actived another theme and I get this message. Warning:
   array_key_exists() [function.array-key-exists]: The second argument should be
   either an array or an object in /home/bah/bahbah/bahbah/wp-includes/widgets.php
   on line 852
 * This is whats on that line 852:
    if ( empty($wp_registered_sidebars[$index]) 
   || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[
   $index]) || empty($sidebars_widgets[$index]) ) return false;
 *  [dreamgenius](https://wordpress.org/support/users/dreamgenius/)
 * (@dreamgenius)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329961)
 * I have a customer using the Flexx Professional 2.7.8 theme on WordPress 2.9.2
   who is experiencing the same problem as the original poster but replacing == 
   with === in lines 925 and 926 has failed to have any effect.
 * Can anyone suggest any other method of getting this working again? She’d rather
   not upgrade the WordPress installation to 3.0.1 as this will break other Plugins
   that she relies on which have not yet been upgraded.
 * I’m stumped and, as a result of changing themes to test the problem, the website
   is currently broken. I’d like to get it working for her again as soon as possible.
 *  [anusethu](https://wordpress.org/support/users/anusethu/)
 * (@anusethu)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329963)
 * Hello,
    our website is [http://www.churchfieldsjunior.com](http://www.churchfieldsjunior.com)
   The widgets have moved down and not in position. I have tried many forums and
   have not received any answers. Please could someone tell me what I should do 
   as I am a novice and not experienced in any php??? Many thanks
 *  [duca](https://wordpress.org/support/users/duca/)
 * (@duca)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329964)
 * Anusethu, maybe you have the widget in to the “footer”, reset it to “default 
   sidebar”.
 *  [anusethu](https://wordpress.org/support/users/anusethu/)
 * (@anusethu)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329965)
 * Thanks Duca,
    I have managed to sort it. I validated the code and fixed the errors
   and it has sorted the issue. Many thanks for your help. Anusethu

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Widgets problem’ is closed to new replies.

## Tags

 * [widgets](https://wordpress.org/support/topic-tag/widgets/)
 * [wordpress 2.9](https://wordpress.org/support/topic-tag/wordpress-2-9/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 6 participants
 * Last reply from: [anusethu](https://wordpress.org/support/users/anusethu/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/widgets-problem-4/#post-1329965)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
