Closed omarabid closed 9 years ago
@JustinSainton Looking at the code, it seems to be done on purpose
if ( ! is_callable( array( $this->controller, $method ) ) ) {
trigger_error( 'Invalid controller method: ' . get_class( $this->controller ) . '::' . $method . '()', E_USER_ERROR );
}
I think a Fatal Error is not appropriate. Maybe redirecting to a 404 page/page not found?
While on the 404 thing. Just crossed my mind. For example we allow the users to create a custom 404 page and we have a template or something that they can edit and that template can show products. Like if i google for glasses, end up on a product page for a wpec store that the URL is not valid like: site.com/glasses-white-product
then the 404 page will say like a Sorry the page was not found and at the bottom show products
@misulicus I think a customisable 404 page is overthinking the issue for the moment. Woo redirects to the theme standard 404 page. The developer/user can always edit/customise his 404 page and even detect which page (store/checkout/other) the user is navigating.
@JustinSainton Should we go the same route? Just redirecting to WordPress 404?
:+1:
If a controller page doesn't exist, it'll throw a Fatal Error.
For example, in checkout process, if you use the path /checkout/doesntexist, it'll throw the following error.