Jump to content

Fun 404 error after upgrade to 6.4.2 but ONLY from specific items


adamfrey

Recommended Posts

A fun one for the brilliant people here - upgraded using the auto function to 6.4.2 from 6.2.9.  Getting some sporadic 404 errors when people click to View Cart but only from specific pages.

Good pages from items go to https://www.euphonium.com/store/index.php?_a=confirm

Bad items add seem to add their category to the web address like this one: https://www.euphonium.com/store/chamber-music/index.php?_a=confirm  (not the inserted /chamber-music/ in the middle.

Also if I just got the home page and access the view cart there, it works fine...

 

Any advice is welcome.  I did look at changing the store settings SEO to "normal" instead of the .html option.

I also added the following to the .htaccess file

 

RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA]

 

 

Link to comment
Share on other sites

Thank you Brian.  Is there something I need to have in the rewrite rule - Here is my .htaccess

# Use PHP7 as default
# AddHandler application/x-httpd-ea-php70 .php

RewriteEngine on
RewriteCond %{HTTP_HOST} ^euphonium\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.euphonium\.com$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^404\.shtml$ "http\:\/\/www\.euphonium\.com\/store\/error\-page\.html" [R=301,L]

<Files http://www.euphonium.com/store/error-page.html>
order allow,deny
allow from all
</Files>

deny from 203.87.178.22
deny from 64.18.2.0/24
RewriteCond %{HTTP_HOST} ^euphonium\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.euphonium\.com$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^403\.shtml$ "http\:\/\/www\.euphonium\.com\/store\/error\-page\.html" [R=301,L]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit


#Weebly Additions Start
ErrorDocument 404 /w_api/Handler.php

RewriteEngine on

RewriteCond %{HTTP_HOST} !^euphonium.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTPS}:s (on:(s)|off:s)
RewriteRule ^/?(.*) http%2://euphonium\.com/$1 [L,R=301,NE]


Options 
RewriteEngine on

RewriteCond %{REQUEST_URI} !-f
RewriteRule ^ajax/(.*)$    /w_api/Handler.php [L]

RewriteBase /
RewriteRule ^$ index.html [R=301,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA]

# stop condition
RewriteRule ^mobile/.*$ - [L]

# only process HTML files
# ----------------------------------------------------

RewriteRule (/|\.html)$ - [S=1]
        # is an html file, start the tests...

RewriteRule .* - [S=9]
        # NOT html file, skip past mobile rules...

# tests
# ----------------------------------------------------

RewriteCond %{QUERY_STRING} ^view=mobile$
RewriteRule ^(.*)$ /$1? [CO=is_mobile:1:%{HTTP_HOST},CO=disable_mobile:0:%{HTTP_HOST},L,R]
        # set cookies, redirect...

RewriteCond %{QUERY_STRING} ^view=full$
RewriteRule ^(.*)$ /$1? [CO=disable_mobile:1:%{HTTP_HOST},L,R]
        # set cookies, redirect...

RewriteCond %{HTTP_COOKIE} (^|;)\s*is_mobile=0
RewriteRule .* - [S=6]
        # skip past mobile rules...

RewriteCond %{HTTP_COOKIE} (^|;)\s*disable_mobile=1
RewriteRule .* - [S=5]
        # skip past mobile rules...

RewriteCond %{HTTP_COOKIE} (^|;)\s*is_mobile=1
RewriteRule .* - [S=2]
        # go to mobile rules...

RewriteCond %{HTTP_USER_AGENT} android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge\ |maemo|midp|mmp|opera\ m(ob|in)i|palm(\ os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows\ (ce|phone)|xda|xiino [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a\ wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r\ |s\ )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1\ u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp(\ i|ip)|hs\-c|ht(c(\-|\ |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(\ |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(\ |\/)|klon|kpt\ |kwc\-|kyo(c|k)|le(no|xi)|lg(\ g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-|\ |o|v)|zz)|mt(50|p1|v\ )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v\ )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|\ )|webc|whit|wi(g\ |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-) [NC]
RewriteRule .* - [CO=is_mobile:1:%{HTTP_HOST},S=1]
        # go to mobile rules...

RewriteRule .* - [CO=is_mobile:0:%{HTTP_HOST},S=2]
        # set cookie, skip past mobile rules...


# mobile rules
# ----------------------------------------------------

RewriteRule ^$ /mobile/index.html [S=1,PT]

RewriteRule ^(.*)$ /mobile/$1 [PT]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /w_api/Handler.php

#Weebly Additions End
 

 

Link to comment
Share on other sites

that is the htaccess for the public_html directory.  Here is the one for the /store/

I believe it has the right information in it at the end...thank YOU!

 

## 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

  ######## 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>

Link to comment
Share on other sites

Yep and it picks up any whatever is the category of the item that you are looking at currently.  If you click to the store homepage, then you can click on the cart no problem.  

Some newer items do NOT have the problem - probably made since I upgraded from V4 to V6 this fall.  But if I click into a category of items like - https://euphonium.com/store/solo-music/solo-with-large-ensemble.html then go to the cart it takes the /solo-music/ category with it to: https://euphonium.com/store/solo-music/index.php?_a=confirm.  

New items have categories but they don't have them in their URL - https://euphonium.com/store/adam-frey-artist-mouthpiece-gold-plated.html is a new item that doesn't have the problem (but it does have a category in the item just not in the url.

Link to comment
Share on other sites

Looking at your site, I see that you are using the BCMobiles skin by Mods Index.

I am going to proceed on the theory that this skin is not 100% reliable under CC642.

To specifically try to solve this problem, we need to look at the template box.basket.com.

Near the bottom of that file,
you will have something that
looks like:

<a href="{$BUTTON.link}"

Change to:

<a href="{$STORE_URL}/index.php?_a=checkout"

I am going to check on the code that assigns a value to {$BUTTON} to see if it has become broken in later versions of CubeCart.

Also, the 'sitemap' plugin has a problem. The hook it uses to provide CubeCart with its CSS file is missing the leading slash.

Also, the web server cannot find this file: /modules/plugins/modsindex_alsolike/css/style.css

 

Link to comment
Share on other sites

Thank you again Brian,

I changed the code in the box.basket.com and it didn't adjust anything.  The mobile skin works fine.

I did not have any problems with 6.2.9 on this skin so curious what might have changed across the upgrade...

Any more specifics on the 'sitemap' and where I need to add that leading slash?

This modules/plugins/modsindex_alsolike/css/style.css - I don't even have that directory at all on my backups from months ago...so I wonder if its from some old mod I made many moons ago...

I sincerely appreciate your problem solving and know you get some amusement about problem solving and puzzles!

Link to comment
Share on other sites

I am not seeing the template code as having changed. Maybe you need to have CubeCart clear its internal cache.

Look in the folder modules/plugins/sitemap/hooks/. There may be a file named class.gui.css.php. Examine the contents of that file.

Look in the main.php template. The links to the stylesheets might be hard-coded in the <head> section.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...