Skip to content

Updating a slug of a taxonomy creates a duplicate until Stache is cleared #5449

@duncanmcclean

Description

@duncanmcclean

Bug description

A client's just reported an issue where a taxonomy is duplicated whenever you change its slug. You end up with a version with the old slug & another with the new slug (the markdown file is named with the new slug). If you clear the Stache, only the new version of the term is found.

Related: #1148

How to reproduce

  1. Create a taxonomy term, call it Test one
  2. Edit the term, change the title & slug to Test two
  3. Go back to the taxonomies page in the CP, see that two terms are now displayed: Test one and Test two.
  4. Look at the taxonomies directory, find that a file exists for Test two but not Test one.
  5. Clear the Stache - via php artisan cache:clear
  6. Go back to the taxonomies page in the CP, see that only one of the two terms is displayed: Test two

Logs

No response

Versions

Statamic 3.2.31 Pro
Laravel 8.80.0
PHP 8.0.15
doublethreedigital/static-cache-manager 1.1.1
rias/statamic-redirect 1.10.3
statamic/migrator dev-master
withcandour/aardvark-seo 2.0.21

Installation

Other (please explain)

Additional details

Upgraded from Statamic v2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions