Opened 14 years ago
Closed 14 years ago
#16703 closed defect (bug) (fixed)
Post permalinks that include %category% should not query the category
Reported by: | ryan | Owned by: | |
---|---|---|---|
Milestone: | 3.1.1 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | Query | Keywords: | has-patch needs-testing needs-moar-testing |
Focuses: | Cc: |
Description
3.1 now includes the category in the query when resolving a post permalink that includes %category%. 3.0 did not do this. This results in 'cat' and other category query vars being set for single post queries. This confuses some plugins and unnecessarily complicates the query. %category% is purely decorative since the post name is sufficient to find a post.
Discovered here:
Attachments (1)
Change History (12)
#2
@
14 years ago
Note that is_category is being correctly set to false. Many plugins seem to be assuming a category query if 'cat' is set, however. One could argue that setting 'cat' is correct, but let's preserve the old expectation as well as get rid of the term query gymnastics for single post queries.
#6
@
14 years ago
No problems so far in testing. Single post queries with various permalinks look good. Category queries look good. Seems to fix The Events Calendar.
3.0 query when resolving /%category%/%postname%/:
3.1 query: