I'm doing a project where a part of the content comes from a custom table, and I use a RenderMvcController to fetch the content from the custom table and return it to the view.
If the requested content does not exist, I return HttpNotFound(). This gives me the default IIS 404 page. If I remove the chosen 404 page from SEOChecker, I get the default Umbraco 404 page.
Alternativly, can I disable the 404 handler in SEOChecker, and use the 404 section in umbracoSettings.config?
You could disable the whole 404 module but then it will also not track not found url's anymore. But good option to add for a future release. What version are you on? I am finalizing 2.9 that works on Umbracov8+ and would be nice if it can be disabled but doesn't it pickup the Umbraco page at all when configured?
Some further tests before an official release but this version should respect your Umbraco 404 collection. It's not possible to disable all functionality otherwise the language specific redirects will no longer work but this version should respect the 404 collection in UmbracoSettings again so you can use that again.
Trigger chosen 404 page from RenderMvcController
Hi Richard
I'm doing a project where a part of the content comes from a custom table, and I use a RenderMvcController to fetch the content from the custom table and return it to the view.
If the requested content does not exist, I return
HttpNotFound()
. This gives me the default IIS 404 page. If I remove the chosen 404 page from SEOChecker, I get the default Umbraco 404 page.Alternativly, can I disable the 404 handler in SEOChecker, and use the 404 section in
umbracoSettings.config
?Thanks!
Hi Ole,
You could disable the whole 404 module but then it will also not track not found url's anymore. But good option to add for a future release. What version are you on? I am finalizing 2.9 that works on Umbracov8+ and would be nice if it can be disabled but doesn't it pickup the Umbraco page at all when configured?
Best,
Richard
Hi Richard,
The normal Umbraco pages are picking up the 404 page set in SEOChecker just fine. It's only the custom pages causing trouble.
I'm on Umbraco 8 and SEOChecker 2.8.2.
I tried to add my own NotFoundHandler according to this documentation https://our.umbraco.com/Documentation/Reference/routing/request-pipeline/IContentFinder#notfoundhandlers , but it doesn't get hit at all when I debug.
Tracking of not found url's is a really helpful feature, so I'd rather not lose out on it.
Please tell me how I can assist you in narrowing down the issue.
Hi Ole,
Add the following attribute to your class and it should be ok to render your 404 page. But that will also replace my 404 handling
But I need to add the feature to disable 404 rendering in a next release.
Best,
Richard
Hi Richard,
The attribute does make my own LastChanceFinder get hit. But the 404 page is still the default Umbraco one:
This is my current implementation of the LastChanceFinder:
And I register it in my composer like this:
composition.SetContentLastChanceFinder<LastChanceFinder>();
I will see If I can implement the disable 404 shortly
But like you said, that will also disable the tracking of 404 errors? That is not what I want.
Am I raising the 404 error correctly by using
return HttpNotFound()
in aRenderMvcController
?This is the first time I'm working with custom data using NPoco, so I want to make sure the error is not on my end :)
Hi Ole,
I am going to make an option that only disables 404 rendering not the rest.
Best,
Richard
Hi Ole,
Some further tests before an official release but this version should respect your Umbraco 404 collection. It's not possible to disable all functionality otherwise the language specific redirects will no longer work but this version should respect the 404 collection in UmbracoSettings again so you can use that again.
https://www.dropbox.com/s/1dwjnsj84y5bw2y/seo-checker29_0.zip?dl=0 Best,
Richard
is working on a reply...