Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#62870 new enhancement

Autosave Stores Default Taxonomy (Category) but Not Custom Taxonomies

Reported by: praful2111's profile praful2111 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Autosave Keywords:
Focuses: Cc:

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:


  1. Create a custom taxonomy using register_taxonomy() in WordPress and make sure show_in_rest = true.
  2. Assign the custom taxonomy to a post type.
  3. Open the block editor for the post type.
  4. Assign terms to both the default taxonomy (category) and the custom taxonomy.
  5. Wait for the autosave to trigger.
  6. 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.

Change History (2)

#1 @gulamdastgir04
2 months ago

  • Type changed from defect (bug) to enhancement

#2 @vedantgandhi28
2 months ago

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.

Note: See TracTickets for help on using tickets.