Open jhenriksen opened 9 years ago
What version of EE? What if you make a route that only does set404, does that work?
EE v2.10.1
I added the following and I get the same blank page:
'test/:any' => function($router) {
$router->set404();
}
Just tested on EE 2.10.1 and it works as expected.
There might be a plugin in your 404 template causing a WSOD. Try setting $debug = 1 in your index.php and see if you can spot any PHP errors.
Thanks for loading that into 2.10.1 and giving it a try.
I set $debug = 1 and I don't see any errors. The 404 page also works in EE templates when I call {redirect="404"}
I replaced the content in my 404 template with just plain text and gave it another try, but got the same result.
I tried setting Display Output Profiler and Display Template Debugging to Yes to see if that gave any hints:
(0.000016 / 1.29MB) - Begin Template Processing -
(0.000048 / 1.29MB) URI: research/labs/123xyz
(0.000066 / 1.29MB) Path.php Template: ./.
(0.000088 / 1.29MB) Retrieving Template
(0.000116 / 1.29MB) Retrieving Template from Database: ./.
(0.017578 / 1.35MB) Template Not Found
(0.017615 / 1.34MB) Template Type:
(0.017647 / 1.35MB) Parsing Site Variables
That looks really similar to Issue #2
I'm having an issue trying to call set404. It's just loading a blank page rather than the 404 page set in the global template preferences. Any ideas? Here's what I'm working with: