[email protected] Posted February 12, 2015 Share Posted February 12, 2015 Ok, so having used a very old version of CC on an old site years ago, I made the recommendation to a friend to consider CC for an online shop front for his retail shop. Everything appeared to install fine, no issues with the database, no error messages, pre-loaded site worked fine. Deleted the test products and category, created a new test product and test category, now whenever a visitor chooses either the category or product (as shown in the new products section on the homepage), the site falls over with an Not Found[CFN #0005] error. Sure enough, hovering over the link the status bar URL includes a html link, not php page... Upon looking at the file structure on the webserver, no such html file exists and isn't being captured by any redirection error trapping. This was a plain vanilla install, nothing changed out of the box. I'm errring on the side of some SEO option either skipped over during configuration but would welcome any pointers to get this CC install operational. The shop can be found here: www.thebarrymusicshop.com TIA Jason Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 12, 2015 Author Share Posted February 12, 2015 OK, carrying on digging at this issue it's patently obvious to me that the .htaccess file is missing from the root of the installation which should contain: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*).html?$ index.php?seo_path=$1 [L,QSA] However, creating the file and putting all that rewrite code in, the pages still fail to pull up the correct SEO path pages based on whatever 'missing' html page is called for. Any ideas? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 12, 2015 Share Posted February 12, 2015 I think CC6 uses and has enabled by defualt what is called "search engine friendly" URLs. These URLs look like: www.mystore.com/name-of-category/name-of-product.html The .htaccess file has mod_rewrite directives to convert the above URL to be: www.mystore.com/index.php?seo_path=name-of-category/name-of-product CubeCart then uses the seo_path value to determine what product to show. It is important, therefore, that the web server have a mod_rewrite capability. That means Apache or nginx with this module enabled. Other web servers will have their own means of effecting a mod_rewtite type of action. And it is important that there be an .htaccess file with CubeCart's rewrite directives. They are:## File Security <FilesMatch ".(htaccess)$"> Order Allow,Deny Deny from all </FilesMatch> #### Apache directory listing rules #### DirectoryIndex index.php index.htm index.html IndexIgnore * #### Rewrite rules for SEO functionality #### <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*).html?$ index.php?seo_path=$1 [L,QSA] </IfModule> In CubeCart's admin, Store Settings, Search Engines tab, one can have CubeCart reload the needed directives into the .htaccess file. Well, the .htaccess file editor used to be there. I don't know where the check to make sure the .htaccess file is present went to. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 12, 2015 Author Share Posted February 12, 2015 Thanks for the update dude... I was attempting to reply to my OP with an update but IPS was giving me an error. I have the .htaccess file in the root, it has a copy/paste of the pastebin post here http://pastebin.com/BsqPARLnit it. However, upon trying to check that the PHP engine on the host is capable of the mod rewrite, when I visit the admin panel then choose PHP Info, the pane on the right is completely blank. Nada. Zilch. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 12, 2015 Author Share Posted February 12, 2015 So, it seems the web host doesn't support MOD REWRITE...What can be done about this now? Is there a way to turn off all this SEO path urls? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 12, 2015 Share Posted February 12, 2015 Assuming you are trying out CC600b5, try this: download the CC5216 package. Replace just this file from the CC5216 package in to the CC6 installation: /classes/seo.class.php. CC6 adds a few more friendly URLs to other pages, but removes a "switch" that enables/disables the entire friendly URL system, as compared to CC5. The switch (again, only in CC5) reads a setting from the store's configuration which won't be there in CC6. So, the result will be 'false' anyway. The CC5 code in this file is always checking for whether the search engine friendly system is enabled, and if not, will not create or use URLs formatted in that style. This is how I see the code should work, but I haven't tried it myself. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 12, 2015 Author Share Posted February 12, 2015 Bingo! I renamed the V6 seo file and uploaded the 5.216 file as a replacement... Refreshed the shop page, instantly saw the 'friendly' URL replaced with some nasty SEO-looking URL, that works! Can't say we're terribly fussed about friends urls at the moment. Would this be considered a bug? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 12, 2015 Share Posted February 12, 2015 No and yes. No, because I (hope) the system requirements spelled out for CC6 make plain the requirement for "Web Server with URL ReWriting Capability". Having not noticed or ignored the system requirements, or not having checked the hosted space's web server setting/capability by the person installing CC6 is not CubeCart's fault. Yes, because there is a check in the CC6 code for the presence of an .htaccess file, and if present, another check to make sure the rewrite directives are there. The end result is an .htaccess file containing the directives will be present in the store folder. However, there is no check to make sure that the web server has URL ReWriting capability, as if that were possible to make a query that would be answered by all web servers. But a quick cURL() test might ask for a SEF URL, and if the response is 404, then something about the environment is not setup correctly. (But that highlights another problem. Some web servers don't like getting cURLs to the same script that is currently running. I'm talking about you, Abyss and Hiawatha.) Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 12, 2015 Author Share Posted February 12, 2015 Bugger...it's not quite the solution I was hoping for! Categories and products now work, sadly the login/registration link top right of the home page doesn't..returning the usual 404 error - http://thebarrymusicshop.com/register.html This is kind of a deal breaker... And, oddly enough, I had a quick web-chat with the hosting company and they confirmed that the server _does_ support MOD REWRITE, so I'm not sure why the .htaccess file is being ignored :| Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 12, 2015 Share Posted February 12, 2015 HiUltimately the solution is to use a hosting company that supports everything that CubeCart needs which actually isnt much. That said, I am amazed that any hosting company doesnt support mod_rewrite !Ian Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 12, 2015 Author Share Posted February 12, 2015 I hear ya...sadly I have no say in where the site is hosted :/ Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 12, 2015 Share Posted February 12, 2015 If the SEO class is now effectively disabled, I wonder what is making that link? thebarrymusicshop.com/register.html It could be a remnant. Please do these things: 1. In admin, Maintenance, Rebuild tab, check the boxes for clearing all the caches, and click Submit. 2. Using an external utility such as phpMyAdmin, find the Cubecart_seo_urls table and delete all the rows. Note: Instead of 2, and new to CC600b5, check the boxes for Clear all custom defined SEO URL's and Clear all auto generated SEO URL's and click Submit. Do not let your browser, if it has a tendency to do this, use its cached copy of index.php. This is usually done by a Forced Refresh. Each browser has it's own way of doing that. Check the links for Login and Register. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 13, 2015 Author Share Posted February 13, 2015 Did the rebuild, cleared everything on that maintenance list actually, to no avail. The registration link is still static. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 13, 2015 Author Share Posted February 13, 2015 Seems this beta version is just a little to buggy to use at the moment - just discovered two bugs... 1) Create new product, enter price, leave sale and cost price *blank*, save the product, view product listing, shows retail price crossed out and £0.00 in red. Go back to admin panel, check the product entry, both cost/sale boxes have 0.00 in them. Sitewide sale disabled too. Add the product to the cart, shows proper price. 2) Change sort method on a category from default to say Z-A (doesn't actually matter what sort you choose), browser refreshes and decides to show you a huge red error message stating that the category doesn't exist - transpires the cat_id reference is lost in the URL. Before my friend enters way too much information into the db regarding products etc... is it a complete ball ache to go back to V5 and maintain the data already entered? Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2015 Share Posted February 13, 2015 If you go back to CC5, you will find that the prices have commas where the decimal point should be, and some prices will show as being 100 to 1000 times as large, as if the decimal point isn't showing, or is showing the character zero as the decimal point. There is another conversation about this that was discussed just recently. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 13, 2015 Author Share Posted February 13, 2015 Right... a comma instead of period shouldn't pose much of a problem. I'm waiting on my ftp client to finish uploading files to a temporary folder on the server so we can run a side by side comparison... There's only a handful of products entered so far, so updating any crazy prices shouldn't take too long. Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 13, 2015 Share Posted February 13, 2015 Seems this beta version is just a little to buggy to use at the moment - just discovered two bugs...That is kind of the point of a beta version lol Although after saying that a proportion of the bugs being found and fixed in V6 exist in V5 anyway so before you jump, you might want to take a lookIan Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 13, 2015 Author Share Posted February 13, 2015 LOL, good point, well made Ian! Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 13, 2015 Share Posted February 13, 2015 HiI am very surprised if those two are general bugs in V6 as would have thought somebody would have found them by now but thanks for reporting them as github issues - sure Al will take a look at both quite quicklyIan Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 13, 2015 Author Share Posted February 13, 2015 Going back to my initial problem... Earlier I was uploading 5.216 to a temporary folder on the server and I can clearly see the option on the SEO settings page that enables/disables SEO URLs. Well, the same thing happens on V5. Enabled, html pages are not redirected to the relevant SEO path. Disabled, the site works fine, with the SEO path in the URL. The install .htaccess button works, it dumps a copy in the root of the installation - so, somewhere along the way, the server simply isn't processing the .htaccess directives correctly. Odd thing is, if I change the .htaccess file to this: Options +FollowSymLinks RewriteEngine On RewriteRule ^(.*)$ http://google.com/[R=301,L] It works exactly as expected, any visits to thebarrymusicshop.com get redirected to Google. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2015 Share Posted February 13, 2015 Basically, the only difference is: <IfModule mod_rewrite.c> ... </IfModule> Your web server does not announce what Brand/Version it is, so maybe whatever web server you are using does not use mod_rewrite.c as the name of the module. Try removing those two lines and see what blows up. And... A CubeCart URL such as: http://thebarrymusicshop.com/index.php?_a=product&product_id=8 we call a "standard" format, as opposed to this "SEO" format: http://thebarrymusicshop.com/rock-school-grade-5-guitar.html Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 14, 2015 Author Share Posted February 14, 2015 Remove the conditional IF makes no difference. Enable SEO links, error 404. From the admin panel, if I attempt to run the PHP Info tool, all I get is a blank pane, nothing loads. This happened on both V6 and V5.216 - looks like this host has quite a few things locked down... Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 14, 2015 Share Posted February 14, 2015 My thoughts and prayers go out to you. Quote Link to comment Share on other sites More sharing options...
[email protected] Posted February 14, 2015 Author Share Posted February 14, 2015 Mmm, given there is no similar switch in V6 to turn the SEO format links on and off, we may we revert to V5.216 for the foreseeable... I couldn't seem to find* a 'what's new in V6' list of features, just to get an idea of what we'll lose by staying with V5. *ok, I didn't look terribly far, but would've expect it to be somewhere close to the V6 download section... Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted February 14, 2015 Share Posted February 14, 2015 Mmm, given there is no similar switch in V6 to turn the SEO format links on and off, we may we revert to V5.216 for the foreseeable... I couldn't seem to find* a 'what's new in V6' list of features, just to get an idea of what we'll lose by staying with V5.V6 is still in beta so there wont be a definitive list of new functionality until 6.0.0 final is released but I can tell you that no new functionality will be added to V5 going forward and a lot has already been added to V6 and will continue to do so going forward.It is hard enough getting E-Commerce stores to rank high in search engines anyway so the idea of running a store without Search Engine Friendly urls swicthed on doesnt make any sense hence one reason why the option is now always on. You have said that you have no choice over which server the site is hosted on but if you are trying to run it on a server that is not compatible then you are going to always have a tough time. This wont just affect CubeCart either, almost any CMS based software (E-Commerce, WordPress etc) will have similar but basic requirements.I echo Brian's sentiments !Ian Quote Link to comment Share on other sites More sharing options...
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.