Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x] Prevent existing term data being overwritten in terms fieldtype #9076

Merged

Conversation

ryanmitchell
Copy link
Contributor

When using a term field type you can search for an existing value and press enter without selecting anything from the autocomplete. On save, this would cause a new term to be created using the same slug, which in turn overwrites the previous terms data.

This PR updates the term creation logic on the fieldtype to check if the term already exists. It also adds a unique constraint on process to prevent duplicates being added.

Closes #7332

@ryanmitchell ryanmitchell changed the title [4.x] Prevent existing term data being overwritten in by terms fieldtype [4.x] Prevent existing term data being overwritten in terms fieldtype Nov 28, 2023
@jasonvarga jasonvarga merged commit f7d78a2 into statamic:4.x Nov 28, 2023
20 checks passed
@ryanmitchell ryanmitchell deleted the fix/term-data-being-overwritten branch December 2, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Taxonomy Value Customizations Are Sometimes Overwritten
2 participants