Welcome Guest, Not a member yet? Register   Sign In
404 Override Bug?
#1

[eluser]riggerthegeek[/eluser]
Hi guys

I think I've found a bug with the 404 override. If I type in a URL, say www.example.com/cro (where the controller "cro" doesn't exist) then it cheerfully goes through to the specified 404 page.

However, if the URL I type in is www.example.com/cron/s (where the controller 'cron' exists but the method 's' does not) then a weird error occurs. It goes through to the specified 404 override as above, but any libraries/models etc loaded in the 'autoload.php' file in the config directory are not set to the $this variable.

Anyone got any ideas about this?

Thanks

S
#2

[eluser]InsiteFX[/eluser]
It's not a BUG!

404 is page cannot be found!

s is a method not a page so you will never get a 404. You will get a method error.

InsiteFX
#3

[eluser]William Rufino[/eluser]
But see, a method error in this kind of app, is a 404 page error, don't you agree?
#4

[eluser]WanWizard[/eluser]
If the request can't be routed, it's a 404 imho.

So it should check for method existence, and if not, for _remap to exist. If not either, it's a 404. If not, you're forced to have a _remap in EVERY controller, to capture calls to non-existent methods. Quite rediculous.
#5

[eluser]William Rufino[/eluser]
Well,

On the router.php file, it just checks if the class exists, not the method, that's why the error is happening...
#6

[eluser]William Rufino[/eluser]
If anyone wants to help... https://bitbucket.org/ellislab/codeignit...ent-439016




Theme © iAndrew 2016 - Forum software by © MyBB