Page Not Found 404 Error Server Error when Deleting Products

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
DonAshby
Commander (CMDR)
Commander (CMDR)
Posts: 172
Joined: Mon Oct 15, 2007 2:53 pm
Location: Palo Alto, CA
Contact:

Page Not Found 404 Error Server Error when Deleting Products

Post by DonAshby » Fri Mar 21, 2008 7:35 am

Hi Everyone,

Has anyone else seen that product pages that are deleted are not being handled properly as a 404 Page Not Found Error?

If you delete a product from your site (or change the title of that product), and then try to go to that old URL, you will get this ominous error page:

http://www.goinginstyle.com/gis/Victori ... 6C126.aspx

This is a product that is no longer on the web site but is still in the Google Index. Products that are deleted can remain in the Google Index for weeks - this is a big deal to us as we want people to get to our site from ALL links that come from Google - the Server Error Message will bounce them off our site .... so we would really prefer if AC sent people who get 404 Page Not Found Errors to this custom page instead:

http://www.goinginstyle.com/gis/index.asp

Should this be changed in AC or can we insert change the code so that Page Not Found errors send people to a proper message - this is how Amazon does it.

http://www.amazon.com/gp/errors/system-error.html

Thanks, Don :?:

PS. Should this go into the bug report?

Will
Captain (CAPT)
Captain (CAPT)
Posts: 263
Joined: Fri Oct 05, 2007 8:02 am

Post by Will » Fri Mar 21, 2008 7:56 am

In the web.config file, the customErrors tag is set to off. If you set it to on you can tell it which file to redirect to for which error:

Code: Select all

<customErrors mode="On" defaultRedirect="~/errors/generic.aspx">
<error statusCode="404" redirect="~/errors/404.aspx" />
<error statusCode="500" redirect="~/errors/500.aspx" />
</customErrors>

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Post by AbleMods » Tue Mar 25, 2008 2:27 pm

I modified the BuyProductDialog control and the CategoryGrid controls so that they redirect to customized search pages depending on the (failed) entry point.

That way, regular content pages still 404 to the home page while product-specific or category-specific (failed) landings can give the user a nice screen to know what happened and landing-specific search choices.

Then I added two custom store fields to hold the redirect URLS and modified the store settings page. If I ever want to change the destinations to new URLs, I just change it in Store Settings and my whole site updates appropriately.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply