volteq Posted May 15, 2023 Share Posted May 15, 2023 we tried to upgrade our website to latest version of cubecart, but something failed along the way. the upgrade was not complete and the system somehow thinks it's upgraded. right now in the admin /maintenance/upgrade section, the message says that it's " Your store is currently using the latest version. Please click force upgrade to restore to the default code for this version. " if I click on the button, there is what I get: The following errors were detected: Please select at least one backup option but there is nothing to select. Is there another way to upgrade? Thanks in advance Please select at least one backup option. Please select at least one backup option. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 I tried to upgrade it manually. although everything seems to be fine and it was able to finish, the website becomes unavailable, not even the admin console. I had to restore the website from the backup, and the database as well. somehow part of the database got wiped out during the upgrade. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 after multiple trials I was able to upgrade, but the website is broken. it shows the categories, but clicking on the category leads to " 404 - Page Not Found Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 We have to ask, upgrading from what version? And please verify that you are running PHP7.4+, strongly preferable to run PHP8.1. And what part of the database seems to be missing? Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 click on any product on home page also leads to the 404 however, on admin page, the product and category related information are all visible 1 minute ago, bsmither said: We have to ask, upgrading from what version? And please verify that you are running PHP7.4+, strongly preferable to run PHP8.1. And what part of the database seems to be missing? we were upgrading from 5.4 or something like that. php 7.4.33 as I said above, all database information are visible from admin page. here is our website, in case it helps: https://volteq.com just changed php to 8.1, still the same thing Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 In admin, Store Settings, Search Engines tab, "SEO URL Extensions", verify that the setting chosen is .html. The Shop By Category is constructed and cached. If, CubeCart's settings then say to not use any document suffix (that is: https://volteq.com/custom-rectifiers without the .html suffix), CubeCart will not find that category. The solution is to either: 1. Have CubeCart clear its internal cache, causing CubeCart to rebuild the Shop By Category listing using the current SEO suffix, or 2. Configure CubeCart to expect to see, and furthermore use, an .html suffix. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 I just changed it to use .html suffix, still the same problem. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 But now I see that using, for example: https://volteq.com/plating-rectifiers results in a hard 404. That suggests that the web server has incorrect or missing rewrite URL directives. Traffic analysis says you are using the Apache web server. So, make sure the directives in the .htaccess file in CubeCart's root folder include the following: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 2 minutes ago, bsmither said: But now I see that using, for example: https://volteq.com/plating-rectifiers results in a hard 404. That suggests that the web server has incorrect or missing rewrite URL directives. Traffic analysis says you are using the Apache web server. So, make sure the directives in the .htaccess file in CubeCart's root folder include the following: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] just added the 4 lines to .htaccess, still the same thing should change back to not use .html? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 Here are the complete, relevant directives in .htaccess: ### Rewrite rules for SEO functionality ### <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ##### START v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L] ##### END v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] </IfModule> ### Default store 404 page ### ErrorDocument 404 /index.php ## Override default 404 error document for missing page resources ## <FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$"> ErrorDocument 404 "<html></html> </FilesMatch> ##### END CubeCart .htaccess ##### You say you had to add the previously mentioned four lines. Now I have to ask that you verify that all the above lines are present. If there is still the hard 404 direct from the web server ( as opposed to CubeCart showing a Kurouto page with a 404 advisory), then please investigate if the web server is recognizing the mod_rewrite module. I would have to say it is, because otherwise, /switching-power-supply.html would not work at all. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 4 minutes ago, bsmither said: Here are the complete, relevant directives in .htaccess: ### Rewrite rules for SEO functionality ### <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ##### START v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L] ##### END v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] </IfModule> ### Default store 404 page ### ErrorDocument 404 /index.php ## Override default 404 error document for missing page resources ## <FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$"> ErrorDocument 404 "<html></html> </FilesMatch> ##### END CubeCart .htaccess ##### You say you had to add the previously mentioned four lines. Now I have to ask that you verify that all the above lines are present. If there is still the hard 404 direct from the web server ( as opposed to CubeCart showing a Kurouto page with a 404 advisory), then please investigate if the web server is recognizing the mod_rewrite module. I would have to say it is, because otherwise, /switching-power-supply.html would not work at all. i made the change and it seems nothing changed Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 The links 'search.html', 'login.html', and 'register.html' work. What does the database table CubeCart_seo_urls look like? Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 do you think it's worth it to reinstall? 5 minutes ago, bsmither said: The links 'search.html', 'login.html', and 'register.html' work. What does the database table CubeCart_seo_urls look like? they all have .html, like this one: linear-dc-power-supply.html Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 That is an option. What version of CubeCart are you running now (admin, Dashboard, Store Overview), and if CubeCart 6.5.1, are you running PHP8.1? Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 (edited) On 5/14/2023 at 11:06 PM, bsmither said: That is an option. What version of CubeCart are you running now (admin, Dashboard, Store Overview), and if CubeCart 6.5.1, are you running PHP8.1? 6.5.1 I don't know if this is useful information, when I tried to upgrade from the admin/maintenance, it gave me a blank page. the admin folder and .php file are missing. this is in the error log: ....public_html/includes/extra/snippet_444a4a10e05f2b6e296bc580adb93af6.php:1 - Undefined array key "DC123" https://volteq.com/anodizing-power-supplies.html public_html/includes/lib/smarty/sysplugins/smarty_internal_runtime_writefile.php:72 - r/cache/skin/wrt6461ce8a42b6d3_15378783,//cache/skin/e71cb750ff44614bcea5c7b74d00548ea0d03658_0.file.box.currency.php.php) [<a href='http://docs.php.net/manual/en/function.rename.php'>function.rename.php</a>]: No such file or directory https://volteq.com/ public_html/includes/lib/smarty/sysplugins/smarty_internal_runtime_writefile.php:79 - /public_html/cache/skin/e71cb750ff44614bcea5c7b74d00548ea0d03658_0.file.box.currency.php.php) [<a href='http://docs.php.net/manual/en/function.rename.php'>function.rename.php</a>]: No such file or directory https://volteq.com/ public_html/includes/lib/smarty/sysplugins/smarty_internal_runtime_writefile.php:84 - unable to write file public_html/cache/skin/e71cb750ff44614bcea5c7b74d00548ea0d03658_0.file.box.currency.php.php https://volteq.com/ Edited May 17, 2023 by volteq Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 (edited) Download the CC651 package to your workstation. Unzip. FTP the files and folders (and their contents) to your site. Run /setup/index.php, choosing to upgrade (NOT a fresh install). Are you running PHP8.1? Edited May 15, 2023 by bsmither Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 1 minute ago, bsmither said: Download the CC651 package to your workstation. Unzip. FTP the files and folders (and their contents) to your site. Run /setup/index.php, choosing to upgrade (NOT a fresh install). I have done that and the above error message is what I have. the website behavior is the same. Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 After running setup, there will be (should be) a new file named admin_hAsHeD.php and a new folder named admin_rAnDoM, where the last part of the names are random letters. Use this new .php file to access the admin. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 (edited) I just managed to get the https://volteq.com/high-current-power-supply.html working. this is what I did: search engine set to no extension go to the category to manually remove the .html from the path manually type in the address and add the .html to the end can you figure out what's wrong with the site? another way is to manually go into the seo url table and manually remove the .html from the links, for instance, this also works after I remove the .html from the database: https://volteq.com/variac-auto-transformer.html I guess one question I have is how to rebuild the seo path after changing the search engine ext setting? Edited May 17, 2023 by volteq Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 Please examine carefully this directive in the .htaccess file: RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] It is just right above: </IfModule> This directive does not have .html as part of it. Please examine the database table Cubecart_seo_urls. If the values in the 'path' column have .html as a suffix, that suffix must be removed. The easiest way to do that is in admin, Maintenance, Rebuild tab, the "Clear all custom defined SEO URL's" and "Clear all auto generated SEO URL's" checkboxes to be checked, then click Submit. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 17 minutes ago, bsmither said: Please examine carefully this directive in the .htaccess file: RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] It is just right above: </IfModule> This directive does not have .html as part of it. Please examine the database table Cubecart_seo_urls. If the values in the 'path' column have .html as a suffix, that suffix must be removed. The easiest way to do that is in admin, Maintenance, Rebuild tab, the "Clear all custom defined SEO URL's" and "Clear all auto generated SEO URL's" checkboxes to be checked, then click Submit. I sort of figured out the problem. if I set the search engine to no extension, and rebuild per your suggestion. then all the urls in the database are without the .html however, when I go to the website and click on the links, they all show up without the .html, so none of them work. to make them work, I have to manually add the .html. what can be done? is there a file that I can go in make some code change to make it add the .html automatically? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 "when I go to the website and [hover the mouse over] the links, they all show up without the .html" That's how it's supposed to work. But you say none of them work. In what way do they not work? That fact that you have to add the .html extension to the web address in the browser in order for the web server to pass the rewritten URL to Cubecart suggests that the rewrite directive in the .htaccess file is not correct. The directive I posted above must be exactly as it is in the .htaccess file, and there must be no other directive in that .htaccess file mentioning 'seo_path'. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 9 minutes ago, bsmither said: "when I go to the website and [hover the mouse over] the links, they all show up without the .html" That's how it's supposed to work. But you say none of them work. In what way do they not work? That fact that you have to add the .html extension to the web address in the browser in order for the web server to pass the rewritten URL to Cubecart suggests that the rewrite directive in the .htaccess file is not correct. The directive I posted above must be exactly as it is in the .htaccess file, and there must be no other directive in that .htaccess file mentioning 'seo_path'. I mean if you choose the no extension on the store settings, and then rebuild, the database of urls are fine. however, when you go to the website, all the links are missing the .html as well, which makes all of them non working there maybe some file that's not getting upgraded from 5 to 6. as for the .htaccess file, I copied it from your comments above, and here it is : RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] ### Rewrite rules for SEO functionality ### <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ##### START v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC] RewriteCond %{QUERY_STRING} (.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L] ##### END v4 SEO URL BACKWARD COMPATIBILITY ##### RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)?$ index.php?seo_path=$1 [L,QSA] </IfModule> ### Default store 404 page ### ErrorDocument 404 /index.php ## Override default 404 error document for missing page resources ## <FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$"> ErrorDocument 404 "<html></html> I just realized something, it seems that the cpanel is automatically making changes to the .htacess file! I don't know how to stop it from messing around Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 15, 2023 Share Posted May 15, 2023 The very first line of the .htaccess file posted above should be deleted. That rewrite directive at the top of the listing may be causing the web server to not process any of the directives in the file. Quote Link to comment Share on other sites More sharing options...
volteq Posted May 15, 2023 Author Share Posted May 15, 2023 I re-made the .htaccess file, and now it seems to be working! Thank you so much for your help! 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.