Post by acutler » Thu Oct 22, 2015 9:11 pm

Hi,

I have an issue that some of the products are coming up with a 404 on the detail view or deep linked from google shopping etc.

I can search for the products and they come up in the search but when i click on the product it errors as not found.

Any ideas?

Many thanks

Newbie

Posts

Joined
Thu Oct 22, 2015 8:37 pm

Post by acutler » Thu Oct 22, 2015 10:56 pm

I have the following in my .htaccess file

RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/stockmanager
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://playdrawer.co.uk/$1 [R,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteRule ^collections/(.*)$ /$1 [R=301,NC,L]

Newbie

Posts

Joined
Thu Oct 22, 2015 8:37 pm

Post by uksitebuilder » Thu Oct 22, 2015 11:26 pm

Change to:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !on [OR]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/stockmanager
RewriteRule ^(.*)$ https://playdrawer.co.uk/$1 [R=301,L]
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteRule ^collections/(.*)$ /$1 [R=301,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by acutler » Fri Oct 23, 2015 12:01 am

Its definitely the SEO URL option causing the issue but it seems to be intermittent, fine for some products but not others.

SEO URL enable
https://playdrawer.co.uk/Cuties-Car-Wash-Outfit
404 Error

Non seo
https://playdrawer.co.uk/index.php?rout ... t_id=10147
Perfect

Currently have the site on non SEO URL until its fixed.

Thanks for the change UKSB (I am using your module which is great BTW), I have modified to exactly that but still get the issue.

Many thanks

Newbie

Posts

Joined
Thu Oct 22, 2015 8:37 pm

Post by uksitebuilder » Fri Oct 23, 2015 12:25 am

If you have access to your database tables, please check in your oc_url_alias table

Find the keyword 'Cuties-Car-Wash-Outfit'

Advise what the query is for that, if you find it.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by acutler » Fri Oct 23, 2015 12:54 am

Thank you UKSB you may have found the issue.

url_alias_id query keyword
6229 product_id=5300 Cuties-Car-Wash-Outfit
12010 product_id=10082 Cuties-Car-Wash-Outfit
12076 product_id=10147 Cuties-Car-Wash-Outfit

It looks like where the product has been removed and then added the url alias still has the old product id reference and it is defaulting to the first it finds

I guess i need to clear out the old IDs, any quick way to sort this that you know of? Maybe its a case of checking off against the current product list.

Many thanks

Newbie

Posts

Joined
Thu Oct 22, 2015 8:37 pm

Post by uksitebuilder » Fri Oct 23, 2015 1:04 am

Ouch, yeah

Alternatively, if you are not too worried about current SEO friendly URLs and them being indexed in the search engines, you could try our Automatic SEO URL's extension. There's an option to generate SEO Friendly URLs for everything after installing it., whcih wipes out the URL Alias table and recreates all the SEO URLs for your current products/categories/pages/manufacturers

I am a little miffed as to how you have gotten duplicates in that table though as deleting a product should delete reference to it in the url_alias table

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by acutler » Fri Oct 23, 2015 6:05 am

Phew SOLVED
Thanks UKSB

I had do work some magic with concatenate and sql statements after deleting all products from the url alias table.

Newbie

Posts

Joined
Thu Oct 22, 2015 8:37 pm

Post by ahimanshu » Fri Apr 16, 2021 6:32 pm

Hello,

in my case found 404 error on google base created feed, how can i fix ?

Regards
Himanshu


User avatar
New member

Posts

Joined
Mon Jul 10, 2017 10:55 am
Location - New Delhi
Who is online

Users browsing this forum: No registered users and 104 guests