Opened 11 years ago
Closed 10 years ago
#27972 closed defect (bug) (duplicate)
wp_update_network_user_counts searches non-existent 'deleted', 'spam' columns
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Networks and Sites | Keywords: | |
Focuses: | multisite | Cc: |
Description
wp_update_network_user_counts executes the following query:
SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'
The columns in the WHERE statement are not in this table, however, causing the query to fail. The WHERE statement appears to have been copied from wp_update_network_site_counts
, where the columns are used to count active, non-spam network sites.
Change History (5)
#2
@
11 years ago
Quick note - I'm seeing this same issue on one of my multisite setups, but haven't had a chance to dig in yet. It seems like dbDelta somehow did not modify the tables correctly. My initial guess was some sort of automated install procedure. I'll take a closer look as well.
#3
@
11 years ago
Yes, confirmed multisite installation. It's been upgraded through a few releases, so Jeremy's hunch re. dbDelta is in line with my thinking.
Hi mkuplens, the
spam
anddeleted
columns are both part of the default schema of the Multisite users table. Can you confirm the site you're working with is a Multisite?