The issue goes away if I remove appendOnDuplication: true, but then duplicating a document results in an error because the slug field has to be unique across documents.
Steps to reproduce:
Have a collection with a slugfield similar to the one displayed above
Create a new document in the collection, give it a name that's not been used before
Let slug autogenerate from title, don't check the checkbox
Expected result:
Document is created with the slug checkbox unchecked and the slug a slugified version of the documents title
Actual result:
Document is created, the slug checkbox is checked and the slug is a slugified version of the title with '-1' appended
I have configured my Payload instance for localized content, here is the localization config from my payload.config.ts file:
I'm facing an issue where the slug field saves with an appended '-1' when I create a new document in a collection.
This is my field:
The issue goes away if I remove
appendOnDuplication: true
, but then duplicating a document results in an error because the slug field has to be unique across documents.Steps to reproduce:
Expected result: Document is created with the slug checkbox unchecked and the slug a slugified version of the documents title
Actual result: Document is created, the slug checkbox is checked and the slug is a slugified version of the title with '-1' appended
I have configured my Payload instance for localized content, here is the localization config from my payload.config.ts file: