Skip to content

Error when adding category with same name as existing category #3910

@afercia

Description

@afercia

On current master, to reproduce:

  • in the sidebar, open Categories & Tags
  • click on "Add new category" at the end of the checkboxes list
  • enter a new category name, for example "qwerty"
  • click the button "Add Category"
  • enter again the same name "qwerty"
  • click the button "Add Category"
  • the UI doesn't show any feedback but in the console you will see:
POST http://src.wordpress-develop.test/wp-json/wp/v2/categories 400 (Bad Request)
GET http://src.wordpress-develop.test/wp-json/wp/v2/categories/[object%20Object] 404 (Not Found)

Expected:

  • either no visual feedback (the classic editor doesn't show any error, it just ignores the whole thing)
  • or a proper error message displayed in the UI
  • in both cases the JS errors should be fixed

Metadata

Metadata

Labels

[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions