#25284 closed enhancement (fixed)
Support tax queries using term_taxonomy_id without specifying a taxonomy
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
Taxonomy queries using term_taxonomy_id
don't actually check to see if the terms exist in the specified taxonomy. So long as an existing taxonomy is used, it allows you to query across multiple taxonomies in one segment of the query. We should officially support not specifying a taxonomy if using term_taxonomy_id as the field, and do the magic to make include_children work.
Attachments (2)
Change History (8)
#3
@
11 years ago
- Keywords has-patch needs-testing added
Having now worked on this and thought about it some more, I don't think include_children
should work without taxonomy
specified so long as we have shared terms. It's backward, and if you're taking the time to get the term_taxonomy_id
, you should get the children that you want while you're at it.
Patch includes the start of some unit tests. They need to be fleshed out to encompass all possible scenarios, and can probably be written better. Still new to that part.
#4
@
11 years ago
- Keywords needs-unit-tests added; needs-testing removed
- Milestone changed from Awaiting Review to 4.0
@helen and I chatted about this - want to look at this during our Taxonomy work in 4.0
#5
@
11 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 28562:
Working on patch, including unit tests to make sure crazy things being done don't break in the future.