Skip to content

Duplicating documents with localized required text(area) field doesn't work #7270

Closed as not planned
@RickGeersing

Description

@RickGeersing

Link to reproduction

No response

Describe the Bug

Hello,

We have an issue with duplicating documents that have required localized text and textarea fields. It seems like it doesn't copy these fields to a new duplicated version of the document. Because they are required it throws an The following fields are invalid error even though the fields are filled in correctly on the page to be duplicated. Would be nice to have this fixed asap, because one of our customers can't duplicate pages. Which is essential for them.

To Reproduce

  1. Enable localization
localization: {
    locales: ['ar', 'de', 'en', 'fr', 'nl', 'pl'],
    defaultLocale: 'nl',
    fallback: true,
}
  1. Add the following field to a collection
{
    name: 'title',
    type: 'text',
    required: true,
    localized: true,
}
  1. Save a document with the title field filled in.
  2. Try to duplicate the document, you should see The following fields are invalid: title

Payload Version

2.24.0

Adapters and Plugins

db-mongodb, bundler-webpack, cloud-storage, nested-docs, search, seo, richtext-slate

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions