Jump to content

[SOLVED] Wire404Exception() in controller does not redirect to 404 page


Recommended Posts

Posted

Hey @Ivan Gretsky,

that does sound like a potential bug, but I haven’t ran into it before and I know that I throw 404 exceptions from controllers time to time. I’ll try to do some testing too, but could you describe the context a bit; in what method / in what circumstances does this happen?

Does it make any difference if you use wire404() instead of directly throwing 404?

 

  • Like 1
Posted

I have it in a Controller file in renderSomething() method called from render(). Function or throw - doesn't matter. I moved this code to init() and even to wireframe.php. The issue is the same. The server returns a 404 code but doesn't redirect and shows an error page.

I have tried this on two other sites with Wireframe. And the behaviour is different there. If i put the code in wireframe.php there, it gives me a 500 error. But in controller it works ok and shows the 404 page. Those 2 sites are not multilingual and not so heavily modified...

Can you suggest a way I can debug further?

I have found the issue. The template of 404 page was changed to a template that caused an infinite loop. Sorry for bothering you @teppo. But natural intellect also needs prompts and you helped me with a one)

  • Ivan Gretsky changed the title to [SOLVED] Wire404Exception() in controller does not redirect to 404 page

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...