Jump to content

cannot upgrade


Recommended Posts

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.

 
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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]

 

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by volteq
Link to comment
Share on other sites

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 by bsmither
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by volteq
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

"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'.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...