| Virtuemart nasty SEF cookie bug fixed |
| Tuesday, 25 September 2007 11:00 | |||
|
VirtueMart Nasty Cookie SEF 301 Bug We have discovered a 301 redirect function built into Virtuemart (VM). When VM set's a cookie it uses a 301 redirect in the server header then resolves to itself with a 200 OK code. What this means is when a user visits the home page of the store, VM redirects and sets a cookie. With SEF turned OFF, this is not a problem seem to cause a problem for sites NOT using SEF. The user experience is seamless but, VM is telling search engines: /index.php?option=com_virtuemart&Itemid=79 (The home page of the store) has been permanently moved to /index.php?option=com_virtuemart&Itemid=79&vmcchk=1. This not optimum from and SEO stand point. It is best to have permanent pages show a server status of 200 OK without the 301 redirect. Now, here's the bug found in the pre Sept 25 2007 VirtueMart Rule for SerrBizSEF. If you set the internal SEF to the VM default homepage, SerrBizSEf wants to redirect the internal URL to the SEF. Let's call it /store.html It all seems to work fine. However, if you check the server headers, you will see numerous 301 status codes. The SEF redirect rule conflicts with the VM process of using a 301 to set the cookies. This nasty bug may result in the search engines NOT indexing and caching your VirtueMart pages. We have modified the VirtueMart SEF Rule to set the default internal URL to the cookie validated URL: /index.php?option=com_virtuemart&Itemid=79&vmcchk=1 After you upload the NEW RULE, if you check the server header status, you'll see a status of 200 OK, which is best for SEO. However, doing this causes VM to show a warning that a browser does NOT accept cookies, even if it does. Of course, when the user moves forward through the site, VM sets additional cookies and the message goes away. Serr.biz is working on the problem. We are testing many options, but it looks like a fix will require customization of the CORE Virtue Mart files. For paid users, we will provide DETAILED instructions. In the mean time, you may want to modify the "No cookies" message as follows: Back up and Open /administrator/components/virtuemart/languages/English.php Around line 1509 find this code: var $_VM_SESSION_COOKIES_NOT_ACCEPTED_TIP = 'Your browser does not accept cookies. If you want to put products into your cart and purchase them you need to enable cookies.'; In quotes you will see the default cookie warning message. Change it to whatever you like. You might want to say something like: "Your browser may not accept cookies. To make a purchase you need to accept cookies. Refresh this page. If this message goes away, you are OK to continue shopping." Save and upload. Note: The itemID of 79 in the above internal URLS will most likely NOT be the same on your site. To find out what the specific ID number is, simply link to the VM component via a menu item, and after publishing, edit the link to see the correct item id number for your specific installation of VirtueMart. Note: After applying the NEW Rule we are able to find our VM pages CACHED properly in Yahoo.com. We're are still waiting for Google to re-index and cache these pages. Since Yahoo had no problems, we expect Google will follow in time.
|
|||
| Last Updated ( Thursday, 18 September 2008 18:19 ) |