Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12964 closed defect (bug) (fixed)

Problems with repair database

Reported by: ocean90's profile ocean90 Owned by: ryan's profile ryan
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Database Keywords: reporter-feedback
Focuses: Cc:

Description

  1. The repair.php checks for all tables, it checks also for *_sitecategories table even though I deactivated global terms. It shouldn't do that, because it returns a doesn't exist message.
  1. If you create a new site and the tables couldn't create successfully and then go to yoururl.com/wp-admin/ you get a message which asked for reparation. If you click on the link you get some notices on repair.php:
Notice: Undefined index: scheme in /html/blog/wp-includes/class-http.php on line 253

Notice: Undefined index: scheme in /html/blog/wp-includes/class-http.php on line 253

Notice: Undefined index: host in /html/blog/wp-includes/class-http.php on line 257

Notice: Undefined index: host in /html/blog/wp-includes/class-http.php on line 257

Warning: Cannot modify header information - headers already sent by (output started at /html/blog/wp-includes/class-http.php:253) in /html/blog/wp-admin/maint/repair.php on line 7

Change History (4)

#1 @nacin
15 years ago

Wondering whether wpdb->tables() should not return $wpdb->sitecategories when global terms is disabled. Problem is, that'd be a call to the DB in repair.php's case. Might be best to just unset $tablessitecategories? if it doesn't exist, as it could be safe to assume that if that's the only table that doesn't exist, then global terms are simply disabled.

If sitecategories' nonexistence is indicative of larger problems, there will be other tables missing or needing repair.

The HTTP errors -- what HTTP request is being called at that point?

#2 @nacin
15 years ago

  • Keywords reporter-feedback added; multisite needs-patch removed

(In [14096]) Don't try to repair sitecategories if it doesn't exist. Global terms may be disabled, though we can't check that without a DB Call. fixes #12964

What about HTTP?

#3 @dd32
15 years ago

To get that sort of error out of WP_HTTP, the function would have ot be called with something such as "/a/path/here.php" or perhaps an empty string, ie. without "http://some.domain.com"

In this case, I think its likely that its Cron firing without a valid blog address.. I expect dumping $url out at that point would reveal it to be an empty string.

There doesnt appear to be any short circuit for a blank url being passed. Calling wp_remote_get(""); will result in the exact same errors.

#4 @dd32
15 years ago

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

(In [14134]) Bail from WP_HTTP when a invalid URL is provided. Fixes #12964

Note: See TracTickets for help on using tickets.