Opened 12 years ago
Closed 12 years ago
#27972 closed defect (bug) (duplicate)
wp_update_network_user_counts searches non-existent 'deleted', 'spam' columns
| Reported by: | mkuplens | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Networks and Sites | Version: | 4.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | multisite |
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
@
12 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
@
12 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi mkuplens, the
spamanddeletedcolumns are both part of the default schema of the Multisite users table. Can you confirm the site you're working with is a Multisite?