Custom 400 page:
In config/settings.yml,
all:
.actions:
error_404_module: error
error_404_action: 404
Then when a page is not found, it will forward to "<your_domain>/error/404".
Custom 500 page:
1. Create "error" folder under "config"
2. create "error.html.php" under "config/error"
Showing posts with label symfony. Show all posts
Showing posts with label symfony. Show all posts
Thursday, November 11, 2010
Monday, November 1, 2010
Solution: route has some missing mandatory parameters
This time I encountered an error in symfony, I set a new route and got this error.
The route is like this:
new_page:
url: /new/page/:id
param: {module: page, action: new}
requirements:
id: \d+
How to fix?
1. Add a default value.
2. Check if you used any routing functions like url_for2() that missing the input parameter.
The route is like this:
new_page:
url: /new/page/:id
param: {module: page, action: new}
requirements:
id: \d+
How to fix?
1. Add a default value.
new_page:
url: /new/page/:id
param: {module: page, action: new, id: 0}
requirements:
id: \d+
2. Check if you used any routing functions like url_for2() that missing the input parameter.
Subscribe to:
Posts (Atom)