There's a bug when I try to customized error page, an 404 page |
Hi there's,
My case in CI 3.1.11 when I trry to set default 404_override route in config, its work for page when no function show_404() set on my controller. BUT if I set function show_404() on my controller its will return default error page. I need to direct page if no id found on my site. weirdly, when I try this :
![]() ![]() and delete your show_404() on your Common.php ![]() ![]() ![]() this my github : My issues on github
how about to set 404_override on your common.php show_404 function
if there's not 404_override set on config/route, so it will return your default error page, BUT... if we set 404_override to our custom error page, its will direct into our page. maybe, on show_404 function we can set a condition like that. ``` function show_404(){ if($route['404_override']==""){ //return your code of show_404 before; }else{ return $route["404_override"] } } ``` so, we can easily use 404 function after set customize page on config/route. hopefully be considered |
Welcome Guest, Not a member yet? Register Sign In |