payload icon indicating copy to clipboard operation
payload copied to clipboard

Unable to save document with large text fields

Open tomekwlod opened this issue 1 year ago • 0 comments

Link to reproduction

No response

Payload Version

tested on 3b32 and 3b24

Node Version

20.9.0

Next.js Version

14.3.0-canary.28

Describe the Bug

I am encountering an issue with Payload CMS where documents containing large text fields are not saving properly. When attempting to save such documents, the request remains pending indefinitely and the document is not saved. This issue persists despite several attempts to resolve it through various configuration changes. The problem is that I cannot even see any error, the request is just pending forever. What's interesting is that if I split the content onto two different fields that won't help either. This tells me that it may be the Content-Lenght issue or something.

Expected Behavior: The document should save successfully, even with large amounts of text in the fields.

Actual Behavior: The save request remains pending indefinitely and the document is not saved.

Environment: MacOS, GCP, Docker, MongoDB

Thanks in advance for any help!

Reproduction Steps

For me it's quite easy to reproduce the issue. It happens on every payload instance I have tried so far. The collection schema may be for example:

const MySchema = {
  slug: 'myschema',
  fields: [
    {
      name: 'largeTextField',
      type: 'textarea',
    },
    // other fields
  ],
};

Now if I populate the largeTextField with a significant amount of text (e.g., 20k of text data) the form will not be saved

Adapters and Plugins

No response

tomekwlod avatar May 22 '24 15:05 tomekwlod