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

Problem on content types where uuid is the only field #3

Open
dappiu opened this issue May 29, 2023 · 4 comments
Open

Problem on content types where uuid is the only field #3

dappiu opened this issue May 29, 2023 · 4 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@dappiu
Copy link

dappiu commented May 29, 2023

Strapi Version: 4.10.6
Node Version: 18.16.0

Steps to reproduce (using the admin UI):

  1. Go to the Content-type Builder, create a new collection type
  2. Add a new field of custom type UUID (from this plugin)
  3. Save the model and wait for the server to restart
  4. Go to the Content Manager and create a new entry for the type just created
  5. Observe that the UUID is correctly generated, but the save button is disabled.
  6. Try to input something into the field, the save button will turn on but now saving the entry will return an error on the field: The value does not match the regex
  7. Try to copy paste a generated value: the regex should match now, but the error remains
@dappiu dappiu changed the title Problem on content types with Draft/Publish feature enabled Problem on content types where uuid is the only field May 29, 2023
@scerelli scerelli added the bug Something isn't working label Jun 13, 2023
@scerelli scerelli self-assigned this Jun 13, 2023
@scerelli
Copy link
Contributor

scerelli commented Jun 23, 2023

Hello @dappiu i tried to follow your steps, but i could correctly save the new custom type with only UUID field in it. Do you have any further details to share? like a short video, log or any other info

@scerelli scerelli added the question Further information is requested label Jun 25, 2023
@jonrot1906
Copy link

I actually found that the described errors here and in #4, including the The value does not match the regex error, are occurring, when trying to populate existing records with a UUID. When creating a new record, everything is working fine and the UUID is also appearing in the API data.

@scerelli
Copy link
Contributor

@jonrot1906, so if I understand correctly, I create a new model without auto UUID. Then, I create a few records, and after that, I add auto UUID to the model. It shouldn't work, right?

@jonrot1906
Copy link

@jonrot1906, so if I understand correctly, I create a new model without auto UUID. Then, I create a few records, and after that, I add auto UUID to the model. It shouldn't work, right?

Exactly. But if you create the records after you added the auto UUID, everything is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants