Comments (6)
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.
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.
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.
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.
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.
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)
- Localization is not managed in `sendEmail` process HOT 4
- File upload field HOT 2
- Require `slug` in `Partial<Block>` type HOT 1
- add fields to form-fields HOT 5
- Is this still maintained? HOT 4
- Incorrect type definition HOT 3
- Safely fail `variables.find` HOT 1
- Add upload field HOT 1
- [Feature request] Form submissions export as CSV HOT 8
- Add documentation about how to create form submissions + a bug HOT 1
- Need to wire up submission validations HOT 8
- Document Front End Implementation HOT 3
- How to use it with @payloadcms/next-payload ? HOT 2
- Feature request: support custom defaultColumns for Form Submissions collection HOT 1
- Feature Request: select multiple support HOT 2
- Required fields are not validated on submission HOT 3
- Field input type hidden HOT 1
- Unable to send form builder emails with resend
- Grouping fields? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-form-builder.