Jack_mcs Posted July 25, 2013 Posted July 25, 2013 (edited) If you have a google webmaster account, you will probably have noticed an increase in the number of soft 404 errors. There are several causes for this but one of the main ones is that oscommerce doesn't return the proper status code when a category, manufacturer or product cannot be found. This addon changes the code so that the correct header status is returned. Edited July 25, 2013 by Jack_mcs Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
Dazza1610 Posted July 25, 2013 Posted July 25, 2013 Yes Yes Yes!! I have this exact problem on my site Jack!!! Quote Magento Sucks - Oscommerce Rocks.
Jack_mcs Posted July 25, 2013 Author Posted July 25, 2013 All sites do, or have the potential for it, since oscommerce doesn't return 404 and 410 codes. Though that is only a problem if categories, manufacturers or products have been deleted or made not available. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
bbott Posted August 3, 2013 Posted August 3, 2013 Hey Jack, great contribution. Exactly what I was looking for. Thank you! Quote
Jack_mcs Posted August 3, 2013 Author Posted August 3, 2013 You're welcome. :) Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
BoogiepopphantomThemisMartÃnez Posted September 1, 2013 Posted September 1, 2013 I have this problem: Fatal error: Call to undefined function IsvalidCatOrMan() index.php on line 46 Quote
BoogiepopphantomThemisMartÃnez Posted September 1, 2013 Posted September 1, 2013 You're welcome. :) Â Any suggestions? Â Â /**** Begin Header Status Handler by Jack York @ ocommerce-solution.com ****/ if (HSH_ENABLE == 'true') { if (($category_depth != 'top' || ($category_depth == 'top' && isset($_GET['manufacturers_id'])) )&& ! IsvalidCatOrMan($cPath, $_GET['manufacturers_id'], $languages_id)) { header("HTTP/1.1 410 Gone"); header("Status: 410 Gone"); printf("<script>window.location='" . HSH_REDIRECT_TO . "'</script>"); exit; } } /**** End Header Status Handler by Jack York @ ocommerce-solution.com ****/ Quote
Jack_mcs Posted September 1, 2013 Author Posted September 1, 2013 It means you didn't install it properly. The required file is probably missing. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
BoogiepopphantomThemisMartÃnez Posted September 1, 2013 Posted September 1, 2013 All the files are in the correct category. I upoload all the files. Quote
Jack_mcs Posted September 1, 2013 Author Posted September 1, 2013 The error is saying differently. It might be that you have altered code that is causing the problem but there's no way for me to troubleshoot that in a support thread. You'll have to figure out why it can't find the included file or pay someone to troubleshoot it for you. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
♥altoid Posted October 3, 2013 Posted October 3, 2013 Works well, one more tool to keep the Google Gods and maybe even Bing happy.  Thanks Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are.
mk_osc Posted November 9, 2013 Posted November 9, 2013 Hello all, Â I've also installed the Header Status Handler, but I'm wondering what you are using for the custom error pages then ? Custom Server Error Pages addon is no longer working as posted in the support thread for new OSC versions. Â Or are you not using any custom error pages ? Then I see no chance to keep the visitor on my site. Thus I liked the idea to have custom error pages in the look and feel of the store, where people can search and view other items. Any feedback or ideas would be very much appreciated. Â Thanks! Quote
♥altoid Posted November 10, 2013 Posted November 10, 2013 @mk_osc  Marcus, my host has a utility that let's me make my own custom error pages. So that's my base.  Then I've also added Goggles 404 error widget for those type pages. It adds a search box for your site with appropriate search suggestions. It tries to provide alternatives to incorrect URLs. (my site has a human friendly sitemap and this Widget found that page and included the link in the 404 custom error page. Available in Google Webmaster Tools Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are.
Jack_mcs Posted November 10, 2013 Author Posted November 10, 2013 @mk_osc A new version of the custom server error addon has been uploaded. mk_osc 1 Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
mk_osc Posted November 10, 2013 Posted November 10, 2013 @@altoid  thanks, also a nice idea, then you simply put your static 404 custom URL into the Header Status Handler value field ? where I have: Redirect To server_error.php?id=404 you have Redirect To 404.html  But does this not break out of the look and feel of your store ?  @@Jack_mcs thanks for taking care of this, it's working very well for now :thumbsup: Quote
♥altoid Posted November 10, 2013 Posted November 10, 2013 @@altoid  But does this not break out of the look and feel of your store ?   It does but there are css examples there and discussion about how to modify the look of the page. I haven't done that though...maybe down the list on my huge "to do" list.  I haven't used the add on Jack mentioned but that may opt better.  Good luck. Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are.
jbhobro Posted January 17, 2014 Posted January 17, 2014 Hello  Great contrib, but i get this error, when i press the review button on a product after installing it:  1054 - Unknown column 'r.reviews_status' in 'field list'  select r.reviews_status as status from reviews r left join reviews_description rd on r.reviews_id = rd.reviews_id where r.products_id = '4956' and rd.languages_id = 4  My shop is V2.2 and i manuel installed the newest version 2.2 addon from 25-7-2013  What can be wrong ? Quote
Jack_mcs Posted January 17, 2014 Author Posted January 17, 2014 That's because that field in the database isn't in your database. It is in later versions and some addons. You can try one of the fixes mentioned here. Please let me know if that doesn't do it and I will take a look at the code. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
jbhobro Posted January 17, 2014 Posted January 17, 2014 Hi Jack  Thank you for the answer.  Should i try to run this on my database ALTER TABLE `reviews` ADD `reviews_status` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `last_modified` ? Quote
jbhobro Posted January 17, 2014 Posted January 17, 2014 I tried the above. Now the tep error dissaper, but when you press the review button products with reviews i get the 404 pagenot found. So maybee i should be ALTER TABLE `reviews` ADD `reviews_status` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `last_modified` , but the contrib will not Work on reviews ... Quote
jbhobro Posted January 17, 2014 Posted January 17, 2014 Changing the default database value to '1' is working. But i guess that the contrib now doesnt make 404 error pages for deleted reviews now ? But never mind the rest i working fine now. Thank you for your help- Quote
jbhobro Posted January 18, 2014 Posted January 18, 2014 Hi again  The redirect to file dont seem to Work in IE 11 .. It Works ok in firefox and chrome. Any solutions ? Quote
jbhobro Posted January 18, 2014 Posted January 18, 2014 There might also be an issue with the 404/410 redirects. Â The 404 should be used for hidden products, categories etc.. as they might get 'unhidden' when you get the product back in stock after a long time. (410 Means permanent Gone). The 410 should only be used for deleted products, categories etc. that never will be back on the sam url? Â http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html Quote
Jack_mcs Posted January 18, 2014 Author Posted January 18, 2014 I don't have IE 11 installed so I can't address that problem. I don't know how to respond to "there might also be an issue." The code is setup to return either a 404 or 410 based on the product in the database. I've not had any problems with it. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
jbhobro Posted January 18, 2014 Posted January 18, 2014 ok. but when does it return 404 and when does it return the 410 ? this might be important for Google SEO.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.