Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Solved by colin avolve View solution

Started by colin avolve 4 years ago · 1 replies · 653 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 jeremycherfas, 1 week ago
4 181 2 days ago
General · by lynbor, 6 days ago
2 122 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 1 week ago
1 124 1 week ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago