#16644 closed defect (bug) (fixed)
[15825] Changed the format of our category links from ?cat=123 to ?category_name=slug
Reported by: | markjaquith | Owned by: | |
---|---|---|---|
Milestone: | 3.1.1 | Priority: | high |
Severity: | normal | Version: | 3.1 |
Component: | Permalinks | Keywords: | has-patch |
Focuses: | Cc: |
Attachments (3)
Change History (22)
#3
in reply to:
↑ 1
@
13 years ago
Replying to bigonroad:
When you say "no canonical redirects", do you mean one of the links doesn't work at all, or just that neither link is 301-ing to the other?
Both links work, no 301-ing takes place.
#4
@
13 years ago
This comes back to the query_Var being set to category_name rather than 'cat' as you'd expect in this case.
The solution would be to change that var, however, I'm pretty sure we'll then also run into the fact that the rewrite rules are also based on that query variable.
#5
@
13 years ago
dd32 — what do rewrite rules matter? This is for default permalinks — no rewrite rules are in play.
#7
follow-up:
↓ 8
@
13 years ago
We need to move back to cat=. category_name= should still work and should probably canonically redirect.
#8
in reply to:
↑ 7
@
13 years ago
- Keywords needs-patch added; has-patch needs-testing removed
Replying to nacin:
We need to move back to cat=. category_name= should still work and should probably canonically redirect.
Oops I thought ?cat= should redirect to ?category_name=
#9
@
13 years ago
Replying to markjaquith:
dd32 — what do rewrite rules matter? This is for default permalinks — no rewrite rules are in play.
I was attempting to make the point of why the change has happened, That it's using the query_var specified in the register_taxonomy call, of whcih, is also utilised by the rewrite rule generation code, when you also look at the get_term_link code, it either uses the permastruct in use, or the query_var, Ie. The generated rewrite rules, as well as the non-rewrite rules rely on the same query var param
#10
@
13 years ago
get_term_link either needs a specific branch for categories in the non-rewrite context to use cat + id rather than category_name + slug (as all other taxonomy non-rewrite rules are)
#11
@
13 years ago
- Keywords has-patch added; needs-patch removed
attachment 16644.2.diff added
- modifies get_term_link to return ?cat= links.
#13
@
13 years ago
Per bug scrub, 16644.2.diff is the direction we want to go. We don't want to change canonical in a dot release. Let's test .2 and get it in.
#15
follow-up:
↓ 18
@
13 years ago
greuben — can you open a ticket with category_name canonical redirect against future release? Just don't want that in 3.1.1
16644.2.diff is good. Going in.
#18
in reply to:
↑ 15
@
13 years ago
Replying to markjaquith:
greuben — can you open a ticket with category_name canonical redirect against future release? Just don't want that in 3.1.1
#19
@
13 years ago
?cat= doesn't include children after all, so get_term_link() will return URLs with different results, based on wether permalinks are turned on or not.
However:
(12:34:42 AM) rboren: That should return it whatever 3.0 did, yes? I don't care what it does as long it is what 3.0 does. :-) (12:35:16 AM) rboren: I need a drink to talk about taxonomy.
Alas, I don't have enough whiskey to make that change. :)
When you say "no canonical redirects", do you mean one of the links doesn't work at all, or just that neither link is 301-ing to the other?