sitecore8 - Sitecore Habitat how can I create a basic 404 page? -


i trying create basic 404 page in sitecore habitat, stumped , new sitecore. i've created notfound page in content tree using basic page.

i have following in website project. <projectname>.web.config under app_config > include > project folder.

<settings>   <setting name="preview.defaultsite" value="qube" />     <!--  item not found handler         url of page handling 'item not found' errors   -->   <setting name="itemnotfoundurl">     <patch:attribute name="value">/notfound</patch:attribute>   </setting>     <!--  link item not found handler         url of page handling 'link item not found' errors   -->     <setting name="linkitemnotfoundurl">       <patch:attribute name="value">/notfound</patch:attribute>     </setting>     <!--  layout not found handler         url of page handling 'layout not found' errors   -->     <setting name="layoutnotfoundurl">       <patch:attribute name="value">/notfound</patch:attribute>     </setting>     <!--  error handler         url of page handling generic errors   -->     <setting name="errorpage">       <patch:attribute name="value">/notfound</patch:attribute>     </setting> </settings> 

i'm getting following error/stack trace when trying hit non-existing url/page, looking @ network tab in console http 500 server error not 404 wanted:

[httpexception (0x80004005): error executing child request /notfound.]    system.web.httpserverutility.executeinternal(ihttphandler handler, textwriter writer, boolean preserveform, boolean setpreviouspage, virtualpath path, virtualpath filepath, string physpath, exception error, string querystringoverride) +2292    system.web.httpserverutility.execute(string path, textwriter writer, boolean preserveform) +822    system.web.httpserverutility.transfer(string path, boolean preserveform) +76    system.web.httpserverutility.transfer(string path) +45    sitecore.pipelines.httprequest.executerequest.handleitemnotfound(httprequestargs args) +845    (object , object[] ) +74    sitecore.pipelines.corepipeline.run(pipelineargs args) +484    sitecore.nexus.web.httpmodule.(object , eventargs ) +525    system.web.synceventexecutionstep.system.web.httpapplication.iexecutionstep.execute() +142    system.web.httpapplication.executestep(iexecutionstep step, boolean& completedsynchronously) +92 

those settings should not point sitecore path. if want use item 404 page, should create processor add httprequestbegin pipeline. more info , code , topic can found in several blogs, e.g. https://briancaos.wordpress.com/2013/03/21/sitecore-404-without-302/

or use sitecore error manager module (see https://ctor.io/handling-404-and-other-errors-with-sitecore-items/). didn't use myself yet, should want.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -