Opened 18 years ago
Closed 17 years ago
#6551 closed defect (bug) (fixed)
get_adjacent_post doesn't exclude categories
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.5.1 | Priority: | normal |
| Severity: | normal | Version: | 2.5 |
| Component: | Template | Keywords: | needs-patch 2nd-opinion |
| Focuses: | Cc: |
Description
So get_previous_post and get_next_post both can't exclude categories.
It would be great to get this into the 2.5 branch, since it's such a simple fix.
Attachments (1)
Change History (14)
#5
@
18 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The fix doesn't completely fix the problem. Even with the fix in place, if the post in the excluded category is also in any other category, the fact that it is in the excluded category is ignored and the post is not excluded from navigation (which is not the behavior of previous WordPress versions).
#7
@
17 years ago
- Milestone changed from 2.9 to 2.6.1
I think this error might be related:
[30-Jul-2008 01:18:56] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') WHERE p.post_date > '2007-05-24 17:38:40' AND p.post_type = 'post' AND p.post_' at line 1 for query SELECT p.* FROM blog_posts AS p INNER JOIN blog_term_relationships AS tr ON p.ID = tr.object_id INNER JOIN blog_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'category' AND tt.term_id IN () WHERE p.post_date > '2007-05-24 17:38:40' AND p.post_type = 'post' AND p.post_status = 'publish' AND tt.taxonomy = 'category' ORDER BY p.post_date ASC LIMIT 1 made by get_adjacent_post
#8
@
17 years ago
- Milestone changed from 2.6.1 to 2.6.2
2.6.1 has been released, moving to 2.6.2 milestone
#9
@
17 years ago
- Keywords has-patch removed
- Milestone changed from 2.7 to 2.8
No patch for current problem, moving to 2.8.
#10
@
17 years ago
- Milestone changed from 2.8 to Future Release
db error described by scribu no longer should occur in trunk based on what I'm reading.
whether the behavior described by TylerMartin is correct is debatable.
#4304 marked a dup of this.