Opened 5 years ago
Last modified 2 years ago
#51779 new defect (bug)
wpdb->get_blog_prefix() doesn't allow wp_1_tablename structures
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Networks and Sites | Keywords: | |
| Focuses: | multisite | Cc: |
Description
Context: We have some OLD networks (10+ years, started as WPMU, etc)
In the process of dropping our Domain Mapping plugin for WordPress's native support, I encountered the following problem. Some (probably very few) old networks have the root site's tables as wp_1_options (instead of wp_options).
if ( defined( 'MULTISITE' ) && ( 0 === $blog_id || 1 === $blog_id ) ) {
return $this->base_prefix;
}
This logic explicitly prevents wp_1_options and friends as being queried, with requests to the root/base site going to wp_options (which doesn't exist).
Perhaps there could be some kind of sanity check that checks for the existence of tables with the prefix in this kind of situation?
Note: See
TracTickets for help on using
tickets.
Hi, @MadtownLems. It has been a while since you opened this issue. I'm wondering if you still have any sites where a potential fix could be testable?