#37922 closed defect (bug) (fixed)
WP_Site_Query does not have a $join query clause to compact
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Networks and Sites | Keywords: | has-patch commit |
| Focuses: | multisite | Cc: |
Description
The new WP_Site_Query class tries to compact() the join variable, which will never exist because there are no related tables to join against.
Recommend we either:
- Add
joinclause &$join = '';toget_site_ids() - Remove
joinfromcompact()statement
Attachments (2)
Change History (9)
#2
@
9 years ago
I would say we add it in as empty as developers filtering the clauses may expect the key to exist. It also looks a bit more future-proof that way.
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
9 years ago
#4
@
9 years ago
- Keywords commit added; 2nd-opinion removed
- Milestone changed from Awaiting Review to 4.7
This can be committed, using the first patch.
#5
@
9 years ago
I think we can follow what we're doing in WP_Network_Query and make $join available to the sites_clauses filter (where it could be used) but not yet add it to the sql_clauses property (where it wouldn't yet be used).
Note: See
TracTickets for help on using
tickets.
Add