#19794 closed defect (bug) (fixed)
Rewrite rules for custom taxonomies not generated as permalinks are switched on
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | major | Version: | 3.3.1 |
Component: | Rewrite Rules | Keywords: | has-patch |
Focuses: | Cc: |
Description
The rewrite rules are not being created for any custom taxonomies when you select the 'Postname' structure. You must first select either 'Day and name' or 'Month and name' (but not 'Numeric'), save the permalink structure, and then select 'Postname' and resave.
I think selecting 'Numeric' fails for above method because none of the taxonomy rules are altered at all when you select 'Postname', so the ones that were created by 'Numeric' still start with 'archive/'.
Attachments (1)
Change History (12)
#3
in reply to:
↑ 2
;
follow-up:
↓ 5
@
13 years ago
Replying to SergeyBiryukov:
Can't reproduce on a clean install. My steps:
- Set permalinks to "Post name".
- Create a custom taxonomy and assign it to a post. I've used Genres and Writers example from Codex with a minor adjustment: for standard posts rather than a
book
post type.- Flush rewrite rules by visiting Permalink Settings screen (without changing the structure).
- The taxonomy archive (e.g. /genre/science-fiction/) is properly displayed.
Have you tried setting the permalinks to 'Default', to remove all rewrite rules, and then setting them back to 'Post name'? To my understanding, when you add a taxonomy the rules are flushed, so your steps would not see an error - it is only when you change the structure after creation.
#4
follow-up:
↓ 6
@
13 years ago
Can you please do the following?
- Post an example piece of code to reproduce it (as simple as possible?) - A similar problem happens sometimes when the incorrect hooks are used
- Does hitting save twice on the permalinks page help?
#5
in reply to:
↑ 3
@
13 years ago
Replying to duck__boy:
Have you tried setting the permalinks to 'Default', to remove all rewrite rules, and then setting them back to 'Post name'?
Just tried that. Taxonomy archive is only displayed then after saving the changes twice, as dd32 suggested. This seems to be the case for other (non-default) structures too, not just "Post name".
#6
in reply to:
↑ 4
@
13 years ago
Replying to dd32:
Can you please do the following?
- Post an example piece of code to reproduce it (as simple as possible?) - A similar problem happens sometimes when the incorrect hooks are used
- Does hitting save twice on the permalinks page help?
I'm unable to post code, as this occurs in the admin panel under permalinks, not through code. And yes, saving it twice does seem to work.
#7
follow-up:
↓ 8
@
13 years ago
I'm unable to post code, as this occurs in the admin panel under permalinks, not through code. And yes, saving it twice does seem to work.
But your custom taxonomies are added via code correct? It sounds like Sergey has duplicated however.
This sounds exactly like #16736 which was supposed to be fixed in 3.3
#8
in reply to:
↑ 7
@
13 years ago
Replying to dd32:
I'm unable to post code, as this occurs in the admin panel under permalinks, not through code. And yes, saving it twice does seem to work.
But your custom taxonomies are added via code correct? It sounds like Sergey has duplicated however.
This sounds exactly like #16736 which was supposed to be fixed in 3.3
Sorry, yes taxonomies are added via code (register_taxonomy()), but that is not what this issue is about. And yes, sounds similar to the other ticket.
#9
@
13 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.4
Looks like #16736 wasn't really fixed. [18443] fixed #18040 for CPT, but the similar issue still exists for custom taxonomies.
19794.patch implements the same fix for register_taxonomy()
.
Can't reproduce on a clean install. My steps:
book
post type.