Opened 19 months ago
Last modified 19 months ago
#62870 new enhancement
Autosave Stores Default Taxonomy (Category) but Not Custom Taxonomies
| Reported by: | praful2111 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Autosave | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
In the WordPress block editor, the autosave feature correctly stores terms from the default taxonomy category, but it fails to store terms from custom taxonomies. As a result, custom taxonomy terms assigned to a post are lost when relying on autosave, unless the post is manually saved.
Steps to Reproduce:
- Create a custom taxonomy using
register_taxonomy()in WordPress and make sureshow_in_rest = true. - Assign the custom taxonomy to a post type.
- Open the block editor for the post type.
- Assign terms to both the default taxonomy (category) and the custom taxonomy.
- Wait for the autosave to trigger.
- Reload the editor without manually saving the post.
Expected Behavior:
Terms for both the default taxonomy (category) and the custom taxonomy should be stored and restored by autosave.
Actual Behavior:
Terms for the default taxonomy (category) are stored and restored correctly.
Terms for the custom taxonomy are not stored, resulting in data loss.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @praful2111,
I followed your steps but couldn't replicate the specific issue. I noticed that during autosave, only post content, title, and excerpt are being saved. Neither default nor custom taxonomies are being saved in the autosave process.