Closed AskChanDra closed 3 years ago
Sorry My mistake
I am getting this error too. How did you go about fixing it.
It was due to the use of the wrong Lambda function URL.
Make sure you are using correct format e.g. FUNCTIONS_URL=/.netlify/functions/newGfEntry
in .env.development.
or simply use /.netlify/functions/newGfEntry
instead of .netlify/functions/newGfEntry
Or last option use absolute URL: http://localhost:8000/.netlify/functions/newGfEntry
Let me know if doesn't fix.
Thanks Chandra
I used that but it didn't work. I commented out the code and I get a 200 status and a success message with my information and everything viewable. I just hope that bit doesn't really have any important information.
What's the major url you uses in sending this to the WordPress backend.
main app.js
Note : make sure you log formData and your are fully connected with WordPress with WPGraphQL plugin
<GravityFormForm
id={4}
formData={formData}
lambda={process.env.FUNCTIONS_URL}
successCallback={handleSuccess}
errorCallback={handleError}
/>
and env with values below
FUNCTIONS_URL=/.netlify/functions/newGfEntry
Make sure you'r running your app using Netlify as below
netlify dev
I was able to get it working by plugging it directly into WordPress but I don't want to use that in production. What I did was putting my gf-entry.js code into a functions folder and then declaring Functions = lambda in the build command in the toml file. Installing netlify lambda and then specifying the specific Function port in the URL. I see my functions being built Into the lambda folder but when I try to send a request I get an error of cannot initialise t before declaration and a 500 status error. How did you go about getting your functions to work specifically.
Make sure you have created the functions
folder on the Netlify.com website on your settings page. That will map to your local working copy then it needs to connect with the online system just for some configuration and then you can test the Lamda function locally.
With the latest version 3.1.0
gatsby-source-gravityforms
getting this error and to fix this I added a patch to change "confirmation_message" to "message".