Giter VIP home page Giter VIP logo

Comments (6)

matteo-naif avatar matteo-naif commented on June 18, 2024 1

I have the same problem

[15:20:29] ERROR (payload):
    err: "Error while sending one or more emails in form submission id: undefined."

from plugin-form-builder.

ChristopherNowlan avatar ChristopherNowlan commented on June 18, 2024

Same issue as well. @matteo-naif @kresogalic8 any chance that both of are using the lexical editor? Because I am and I think that may be the issue for me.

Because when you print the error out I get -

err: { "type": "TypeError", "message": "children.map is not a function", "stack": TypeError: children.map is not a function at serialize (node_modules/@payloadcms/plugin-form-builder/src/utilities/serializeRichText.ts:17:7) at /node_modules/@payloadcms/plugin-form-builder/src/collections/FormSubmissions/hooks/sendEmail.ts:54:40 at Array.map (<anonymous>) at node_modules/@payloadcms/plugin-form-builder/src/collections/FormSubmissions/hooks/sendEmail.ts:29:60 at step (/node_modules/@payloadcms/plugin-form-builder/dist/collections/FormSubmissions/hooks/sendEmail.js:33:23) at Object.next (/node_modules/@payloadcms/plugin-form-builder/dist/collections/FormSubmissions/hooks/sendEmail.js:14:53) at fulfilled (node_modules/@payloadcms/plugin-form-builder/dist/collections/FormSubmissions/hooks/sendEmail.js:5:58) at processTicksAndRejections (node:internal/process/task_queues:95:5) }

from plugin-form-builder.

matteo-naif avatar matteo-naif commented on June 18, 2024

Yes, I'm using lexical to write the Confirmation Message and the email message because it's the default in the FormBuilder plugin.

I found the same error you reported also in the frontend trying to serialize the content of the confirmation message. It seems that now the structure of the object is different, there is an object root that wrap everything so the map method cannot works because it's an object.

The following is the object I receive from payload to print the confirmation message, I resolved serializing the first children property that is an array.

Maybe the problem is the same?

{
    "root": {
        "type": "root",
        "format": "",
        "indent": 0,
        "version": 1,
        "children": [
            {
                "children": [
                    {
                        "detail": 0,
                        "format": 0,
                        "mode": "normal",
                        "style": "",
                        "text": "Grazie per aver compilato il form.",
                        "type": "text",
                        "version": 1
                    }
                ],
                "direction": "ltr",
                "format": "",
                "indent": 0,
                "type": "paragraph",
                "version": 1
            }
        ],
        "direction": "ltr"
    }
}

from plugin-form-builder.

ChristopherNowlan avatar ChristopherNowlan commented on June 18, 2024

I think the email message is being serialise by slate as far as I can tell from this file https://github.com/payloadcms/plugin-form-builder/blob/main/src/utilities/serializeRichText.ts

@matteo-naif this pull request shows that its not supported - https://github.com/payloadcms/plugin-form-builder/pull/63/commits/4269064b2c24893ce8ab410b9f6d58652d5ce5fa

from plugin-form-builder.

jacobsfletch avatar jacobsfletch commented on June 18, 2024

Sounds like some of you are having an issue with Lexical, which is currently not fully supported. There's an open issue for this here. Feel free to drop a comment of support in there to bump that work. @kresogalic8 if this is not your issue, feel free to open a new ticket in the Payload monorepo with more details and ideally a reproduction.

from plugin-form-builder.

jacobsfletch avatar jacobsfletch commented on June 18, 2024

This plugin is now being maintained in the Packages Directory of the Payload Monorepo. This repo will soon be archived and all open issues including this one will be closed. Please refer to this open discussion for more details and to continue the conversation. Or feel free to open a new discussion around this, or even hop on our Discord and get help there.

from plugin-form-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.