Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Runtime exception page not found (modular form; action route)

Solved by colin avolve View solution

Started by colin avolve 4 years ago · 1 replies · 964 views
4 years ago

I am testing a contact form in a modular page.

The form fields display as expected, and I have followed the details at

https://learn.getgrav.org/17/forms/forms/how-to-forms-in-modular-pages

to double check I am doing it correctly. In particular

YAML
form:
    action: /home

where 'home' is the page route for the modular page.

When I attempt to send a message, there is a

TXT
 RuntimeException (400)
Display page not found. Please check the page exists.

(with reference to the form plugin).

When I attempt to view the modular page directly, using example.com/home I receive a

TXT
404 page not found error

Anyone have a suggestion for what I might be missing, or need to do differently?

Thanks!

4 years ago Solution

In troubleshooting this further, It appears that having

TXT
- display: thankyou   

at the end of

TXT
`process:`

was causing the issue. I had copied this from the example at

https://learn.getgrav.org/16/forms/forms

After removing

TXT
- display: thankyou   

I have successfully tested the form using mailtrap

Suggested topics

Topic Participants Replies Views Activity
General · by lynbor, 1 month ago
5 541 5 days ago
General · by Andy Miller, 2 weeks ago
0 230 2 weeks ago
General · by lynbor, 4 weeks ago
7 658 3 weeks ago
General · by Harry, 3 weeks ago
0 235 3 weeks ago
General · by Old Man Umby, 1 month ago
2 368 1 month ago