Cringe-Studio / strapi-auto-uuid

Custom field plugin to automatically add manage uuid for your content types, inspired by @strapi-plugin-field-uuid
MIT License
12 stars 22 forks source link

Problem on content types where Draft & publish feature is activated #4

Open dappiu opened 1 year ago

dappiu commented 1 year ago

Strapi Version: 4.10.6 Node Version: 18.16.0

This may very well be related to #3

Steps to reproduce using the admin UI:

  1. Go to the Content-type Builder, create a new collection type and enable Draft & publish on the advanced settings tab
  2. Add a regular short text field (this is only to prevent falling into #3)
  3. Add another field of custom type UUID (from this plugin)
  4. Save the model and wait for the server to restart
  5. Go to the Content Manager and create a new entry for the type just created
  6. Observe that the UUID is correctly generated, but the save button is disabled.
  7. Input something on the text field, now the save button is enabled. Save the draft, but do not publish it.
  8. Now we came back to editing the entry because we want to publish it. The UUID is there on the field, but upon clicking on Publish an error is shown on the field This value is required.
  9. Try to edit the value, the error now shows The value does not match the regex
scerelli commented 1 year ago

Hello again. I can't reproduce the problem, I followed your steps and I could correctly publish my content, even without adding a text field. Did you try the plugin on a new strapi project?

Note: if you were using this other plugin: https://www.npmjs.com/package/@bn-digital/strapi-plugin-field-uuid check that you removed all parts of it in package json and delete your node_modules and perform a new npm/yarn install.