Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample code does not allow form submission #203

Open
faanskit opened this issue Mar 19, 2024 · 0 comments
Open

Sample code does not allow form submission #203

faanskit opened this issue Mar 19, 2024 · 0 comments

Comments

@faanskit
Copy link

Tried to follow the instruction, with partial success.
Site comes up, but submission fails.

How to reproduce

(1) Create a new Netlify server from template using url
(2) Clone to developer PC (git clone....)
(3) Install dependencies with npm install
(4) Run locally using netlify dev

Result: A server running on port 8888
http://localhost:8888/

Logs

◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Setting up local development server
Cleaned up .netlify\functions-internal.
◈ Starting Netlify Dev with Nuxt

> [email protected] dev
> nuxt

ℹ Listening on: http://localhost:3000/
ℹ Preparing project for development
ℹ Initial build may take a while
✔ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml
i Discovered Components: .nuxt/components/readme.md
✔ Builder initialized
✔ Nuxt files generated

   ┌─────────────────────────────────────────────────┐
   │                                                 │
   │   ◈ Server now ready on http://localhost:8888   │
   │                                                 │
   └─────────────────────────────────────────────────┘

◈ Loaded function joke
[webpackbar] ℹ Compiling Server
[webpackbar] ℹ Compiling Client
[webpackbar] ✔ Server: Compiled successfully in 3.55s
[webpackbar] ✔ Client: Compiled successfully in 3.92s
ℹ Waiting for file changes
ℹ Memory usage: 189 MB (RSS: 276 MB)
ℹ Listening on: http://localhost:3000/
◈ Rewrote URL to /.netlify/functions/joke
Request from ::1: GET /.netlify/functions/joke
Response with status 200 in 178 ms.

(5) Populating the form with sample data (test, [email protected], test) and pressing Submit.
Result:
http://localhost:8888/success
Function not found...

Logs:

 »   Warning: Missing form submission function handler
Request from ::1: POST /success
Response with status 404 in 1 ms.
 »   Warning: Missing form submission function handler
Request from ::1: POST /success.html
Response with status 404 in 1 ms.
 »   Warning: Missing form submission function handler
Request from ::1: POST /success.htm
Response with status 404 in 1 ms.
 »   Warning: Missing form submission function handler
Request from ::1: POST /success/index.html
Response with status 404 in 1 ms.
 »   Warning: Missing form submission function handler
Request from ::1: POST /success/index.htm
Response with status 404 in 0 ms.

Same result on production site. 404 error for /success page.

ps. Log message is confusing with both port 3000 and 8888 indicated,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant