We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

removeRoute not working | Forum

Purusothaman Ramanujam
The below function does not work with Oxwall 1.5 but it worked in 1.4 version.

OW::getRouter()->removeRoute('base_page_404');

I have posted it before and I don't mind posting the same topic again in multiple posts in the hope that it would be at-least seen by Oxwall team.
Michael I.
Michael I. Feb 1 '13
Our devs told me that now redirects are working using content swap, not old function. Tell me what difficulties did this change cause to you and I'll consult with our developers about solution.
Purusothaman Ramanujam
I have been using this function to remove the default base_page_404 controller template and replacing another custom route with my own controller for handling 404 errors in my custom 404 plugin.
Michael I.
Michael I. Feb 5 '13
Currently there is no event in the script that allows replacing 404 errors, sorry.
Purusothaman Ramanujam
I am just trying to understand how it worked before. Even before there was no event. It was just a route which worked. But only this particular route is not being able to remove by removeroute function.
Michael I.
Michael I. Feb 8 '13
Can you give me more details on what do you want to achieve so that I could discuss it with our developers? Vague explanations are not really helpful, sorry.
Purusothaman Ramanujam
If you could look in my custom404 plugin, I used this function to remove the existing base_page_404 route and add my own route in the same name, so that my plugin takes care of the custom 404 error messages.

After 1.5, I am not able to replace the route base_page_404 with my own.

Please let me know (PM) if you need more information on this.
Michael I.
Michael I. Feb 12 '13
Sorry, but there is no option of doing what you want in Oxwall. We will take this into consideration in the upcoming Oxwall release. Let us know if you have any suggestions.
Purusothaman Ramanujam
There was an option before 1.4 and why not in 1.5? It worked well with 1.4.

what was changed in 1.5 regarding this?
Michael I.
Michael I. Feb 20 '13
That was an useless redirect that we got rid off. There was a problem that links that led to 404 were changing their URLs and we made it work more SEO friendly with 1.5.
Purusothaman Ramanujam
Thanks. But for me personally, it look not SEO friendly.
Michael I.
Michael I. Mar 11 '13
What makes you think that current behavior is not user-friendly?
Purusothaman Ramanujam
I know that headers are updated with 404 but the webmaster tools generally dont catch such things as present.

Its my personal opinion. Correct me if I am wrong.
Michael I.
Michael I. Mar 27 '13
There is no need in changing the URL once you get a 404, that is a common practice among all scripts.
Purusothaman Ramanujam
Thanks for information. :)