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

A duplicated entry can be saved even if a unique field shares the same value as the original one #20141

Open
lucasboilly opened this issue Apr 17, 2024 · 3 comments
Assignees
Labels
community issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: core:content-manager Source is core/content-manager package status: confirmed Confirmed by a Strapi Team member or multiple community members

Comments

@lucasboilly
Copy link
Contributor

lucasboilly commented Apr 17, 2024

Bug report

Required System information

  • Node.js version: 18.17.1
  • NPM version: 9.6.7
  • Strapi version: 4.23.1
  • Database: sqlite
  • Operating system: macOS 14.4.1
  • Is your project Javascript or Typescript: Javascript

Describe the bug

When an entry is duplicated, it's still possible to save it even if a unique field have the same value as in the original one. However, if the value is changed, saved and that we write the identical value again, the error is displayed.

Steps to reproduce the behavior

  1. Create a Content-Type with a unique field in it
  2. Create an entry and fill the unique field
  3. Go to the List View
  4. Duplicate the entry
  5. Click "Save"

Expected behavior

I'm supposed to see an error on the unique field an not being able to save.

Screenshots

CleanShot.2024-04-17.at.13.30.32.mp4

Additional context

Maybe is it linked to #20001 ?

@lucasboilly lucasboilly changed the title A duplicated entry can be saved even if a unique field shares the same value with the original one A duplicated entry can be saved even if a unique field shares the same value as the original one Apr 17, 2024
@Sruthi-Palle
Copy link

hi @lucasboilly this is sruthi a frontend developer , i can resolve this issue, can you assign this to me.

@joshuaellis
Copy link
Member

We don't assign issues. Just feel free to open a PR 😄

@kasonde kasonde added issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product status: confirmed Confirmed by a Strapi Team member or multiple community members source: core:content-manager Source is core/content-manager package labels Apr 22, 2024
@kasonde kasonde self-assigned this Apr 22, 2024
@dplumptre
Copy link

i have a PR for this issue: #20221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: core:content-manager Source is core/content-manager package status: confirmed Confirmed by a Strapi Team member or multiple community members
Projects
Status: To be reviewed
Status: Reproducible on v4
Development

No branches or pull requests

6 participants