Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#6401 closed defect (bug) (invalid)

Admin Dashboard not Working

Reported by: chaoticmortalcom's profile chaoticmortalcom Owned by:
Milestone: Priority: high
Severity: major Version: 2.5
Component: Administration Keywords:
Focuses: Cc:

Description

My admin dashboard is not working right now, and it displays:

Fatal error: Call to undefined function wp_register_sidebar_widget() in /*/*/*/*//www/chaoticmortal.com/wp-admin/includes/dashboard.php on line 31

What did I do wrong, or is it my server? All the other pages work, so I think its with the widget thing (as it says in the error). I commented out line 31 on the thing and then it popped up with line 45, which happens to be the next "register", so what is wrong with that?

Please help. I'm tired of typing in wp-admin/post.php whenever I want to post (it works, though).

Change History (16)

#1 @lloydbudd
17 years ago

What WordPress build / revision are you using? Did you disable your plugins and try the default theme?

#2 @ryan
17 years ago

  • Milestone 2.5 deleted
  • Resolution set to invalid
  • Status changed from new to closed

That function is defined in wp-includes/widgets.php. Make sure that file and wp-settings.php were correctly updated.

#3 @chaoticmortalcom
17 years ago

  • Milestone set to 2.5
  • Resolution invalid deleted
  • Status changed from closed to reopened

Well, they are uploaded correctly, Ryan. I just checked widgets.php and wp-settings.php and re-uploaded them both. It still shows the same bug.

I am using WordPress 2.5 RC2. Please help!

#4 @DD32
17 years ago

Well, they are uploaded correctly, Ryan. I just checked widgets.php and wp-settings.php and re-uploaded them both. It still shows the same bug.

re-upload the entire wp-admin & wp-inlcludes folders, Watch for any failed files, it definately works with no plugins loaded here.

#5 @chaoticmortalcom
17 years ago

Did that, same error.

#6 @ryan
17 years ago

It's defined on line 95.

http://trac.wordpress.org/browser/trunk/wp-includes/widgets.php#L95

Do you see that in your copy of widgets.php?

#7 @ryan
17 years ago

Are you using a plugin the prevents Widgets from being loaded? 2.5 requires that the be loaded for the admin.

#8 @chaoticmortalcom
17 years ago

Yes, the one in /wp-includes/widgets.php is there, but something strange is that the error says /wp-admin/includes/widgets.php, and that isn't in it.

K2 (the theme I use) might have some kind of thing thats different (the widget editer is different, and it uses Mr. Nybble's Sidebar Modules?)

#9 @chaoticmortalcom
17 years ago

I inserted the wp-register-sidebar-widget into wp-admin/includes/widgets.php and received the same error, except for wp-admin/includes/dashboard.php. I then inserted wp-register-sidebar-widget into that, and then it gave me "unexpected $end" for the last line.

HELP!

#10 @ryan
17 years ago

I think Sidebar Modules uses a hook we added in 2.3 that prevents widgets from being loaded. It prevents them from being loaded for both front page loads and admin pages. 2.5 requires them to be loaded for admin pages. Look in sidebar modules for a line that resembles this and comment it out:

remove_action( 'plugins_loaded', 'wp_maybe_load_widgets');

It might look a bit different. You can search for "wp_maybe_load_widgets".

#11 @chaoticmortalcom
17 years ago

Will it affect my theme / sidebar?

#12 @chaoticmortalcom
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Okay, I found it in a little spot called disable-widget.php and commented out the thing. It still wouldn't work, so then I removed the wp-register-sidebar-widgets that I inserted into dashboard.php and widgets.php and it worked. But now my sidebar is Widgets, but I really want Modules. I really wish the admin wasn't mixed up with the theme and they used separate copies or something.

#13 @DD32
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

But now my sidebar is Widgets, but I really want Modules.

Then the theme is going to need updating to work correctly..

I've got no clue on your theme, But a possible way to do it would be to uncomment whatever you removed, and add this in at the same place

if( is_admin() ){
global $pagenow;
if( $pagenow == 'index.php' )
wp_maybe_load_widgets();
}

Once again, Not sure if its going to help at all.

#14 @DD32
17 years ago

  • Milestone 2.5 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

#15 @chaoticmortalcom
17 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

It works. Thanks a billion!

#16 @chaoticmortalcom
17 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.