Skip to content

Navigation: Loading the fallback creates multiple wp_navigation CPTs #46194

@scruffian

Description

@scruffian

What problem does this address?

When a navigation block is in a fallback state, it creates a draft wp_navigation CPT, once a user interacts with it. If this draft is not saved then, next time we load the block we load the fallback again, rather than the draft. This can lead to a situation where a user has multiple draft wp_navigation CPTs in their admin.

What is your proposed solution?

When the block is in a fallback state, we should delete draft wp_navigation CPTs, and create a new one with the latest fallback data, to avoid creating multiple useless drafts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions