Drupal 8.0.0-beta14

Steps:
1. Add one term, with URL alias '/fixtures'.
2. Delete the term.
3. Add the same term again. When press 'Save' button, Drupal 8 shows error message:
1 error has been found: URL alias

URL alias
/fixtures
The alias is already in use.
4. Input a new URL alias, e.g., '/fixtures-new', Save.
5. Configuration->Performance->Clear all caches, does not fix.
6. Check MySQL, it shows:
In 'taxonomy_term_field_data' table, only newly added term with tid '2' is there. First term has been deleted.
In 'url_alias' table, there is still a row for deleted term with tid '1'. Url alias of first term has not been deleted.

7. Go to Configuration->URL aliases, find the row corresponding to deleted term,
/fixtures /taxonomy/term/1 English edit/delete
/fixtures-new /taxonomy/term/2 English edit/delete
in my case, '/taxonomy/term/1', has been deleted, to make sure, I press '/taxonomy/term/1', it shows 'Page not found'.
Press 'Delete' on the '/taxonomy/term/1' row.
Press 'Edit' on the '/taxonomy/term/2' row, now I can set path of '/taxonomy/term/2' as '/fixtures'.

8. Suggestion: when deleting a taxonomy term, release/delete its URL alias also.

Comments

Grammer created an issue. See original summary.

attiks’s picture

Version: 8.0.0-beta14 » 8.0.x-dev
Category: Feature request » Bug report
Priority: Normal » Major

this is a bug, any idea if the same problem exists for nodes?

albertski’s picture

Just tested the same scenario on a node and it has the same issue. Created issue 2551999 for the node problem.

attiks’s picture

Priority: Major » Critical

It is probably known but marking as critical so it gets noticed

albertski’s picture

Component: taxonomy.module » path.module
Status: Active » Needs review
StatusFileSize
new599 bytes

Using hook_ENTITY_TYPE_delete() to delete the alias.

attiks’s picture

Issue tags: +Needs tests

Needs a test as well

larowlan’s picture

Why is this critical? There is no data loss

attiks’s picture

Priority: Critical » Major

#7 You're right, but this will confuse people completely, imagine editor 1 creates and deletes the term, editor 2 tries to create a term using the same alias and gets the error message

larowlan’s picture

Status: Needs review » Closed (duplicate)