404_override doesn't work as expected.. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: 404_override doesn't work as expected.. (/showthread.php?tid=37855) |
404_override doesn't work as expected.. - El Forum - 01-22-2011 [eluser]Glazz[/eluser] Hello, I'm using 404_override in my routes to show my custom error page, it works but only for non existing controllers, if you have a non existing method in a controller it shows the default error page. Example: Code: http://domain.com/non-controller Code: http://domain.com/existing-controller/non-method Is this a bug? Or do i need to something else so it can show error for non existing methods inside existing controllers? Regards - Glazz 404_override doesn't work as expected.. - El Forum - 01-28-2011 [eluser]idealws[/eluser] I am experiencing this same issue using CI 2.0.0 now. Anyone have a fix for this? Regards, Ray 404_override doesn't work as expected.. - El Forum - 01-28-2011 [eluser]Eric Barnes[/eluser] I am testing this now and it is doing something weird. It is late here and I don't have time to fully test this to find a fix. Can you post this as a bug in the reactor? https://bitbucket.org/ellislab/codeigniter-reactor/issues?status=new Please be specific and thorough in the report. 404_override doesn't work as expected.. - El Forum - 01-28-2011 [eluser]Glazz[/eluser] Eric, https://bitbucket.org/ellislab/codeigniter-reactor/issue/19/404_override-problem Don't know if i done it right though. - G l a z z 404_override doesn't work as expected.. - El Forum - 01-28-2011 [eluser]Eric Barnes[/eluser] Perfect! 404_override doesn't work as expected.. - El Forum - 01-30-2011 [eluser]Eric Barnes[/eluser] I just commited a fix for this: https://bitbucket.org/ellislab/codeigniter-reactor/changeset/2fa0e75a2101 Can you give that change a try and report back? 404_override doesn't work as expected.. - El Forum - 01-30-2011 [eluser]Glazz[/eluser] Hello, With those changes now whenever the method doesn't exist, it shows the index of the controller, it's better, but yet not as expected :c 404_override doesn't work as expected.. - El Forum - 01-30-2011 [eluser]Eric Barnes[/eluser] Rats! I tested it but not thorough enough I think this should do it if you want to test again. Code: // is_callable() returns TRUE on some versions of PHP 5 for private and protected 404_override doesn't work as expected.. - El Forum - 01-30-2011 [eluser]Glazz[/eluser] Yeaps, i believe it is working now, at least i've tested with some pages and it shows my custom error page x) Thanks - G l a z z Edit: Now i have another problem, if i try to access a non existing controller it shows the page fine, but for some reason if i try to access a non existing method it shows this: Code: A PHP Error was encountered This is my custom error controller page: Code: <?php $this->load->view('topo'); ?> If i comment out the load->view('topo'); line the error doesn't show up, but this only happens for non existing method's.. 404_override doesn't work as expected.. - El Forum - 02-01-2011 [eluser]Eric Barnes[/eluser] Giazz, I just made another commit and in all my tests it is fully working. Can you give this a shot? https://bitbucket.org/ellislab/codeigniter-reactor/src/68da135ce080/system/core/CodeIgniter.php |