Post by adamo7812 » Wed Feb 17, 2021 7:57 pm

Hi,
I'm using OC 3.0.3.3 and i just noticed that my products appear under every seo url combination. For example: I have a valid URL like: https://mydomain/maincategory1/subcategory1/product1 but I can reach this product if I type this URL: https://mydomain/maincategory2/subcategory1/product1 or https://mydomain/maincategory1/subcategory2/product1 etc... (The product linked to only one category.) I know that every road leads to Rome :) but it’s funny when I see Jackets as category in the title bar but I see cars on the screen. And Google just started show my products with wrong category in their search results... This is how opencart should work by default? Are there any solution to fix this?

Newbie

Posts

Joined
Mon Apr 20, 2020 2:26 am

Post by mikeinterserv » Thu Feb 18, 2021 12:25 am

Can you post a url

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by adamo7812 » Thu Feb 18, 2021 12:31 am

The correct URL is:
https://farm-shop.hu/orsok/elsofekes-or ... 1bb_D56667
And if I change "orsok" to "botok" it also shows the product:
https://farm-shop.hu/botok/elsofekes-or ... 1bb_D56667

Newbie

Posts

Joined
Mon Apr 20, 2020 2:26 am

Post by mikeinterserv » Thu Feb 18, 2021 12:48 am

Well it appears normal :-)
In 2 shops 3.0.3.2and 3.0.3.6 I can change the front category in address bar and the product then appears to be in the wrong category.
HOWEVER this CANNOT happen without a REAL LINK of that url in normal operation.
As long as your htaccess rewrites and or redirects are set up properly there should be no issue.
It does not stop somebody from setting up a page of nonsense links though to affect your search listings.
I would say that something is wrong with this situation and a page not found should be returned NOT a nonsense url displaying the page.

Hopefully straighlight or switch or someone will throw more light on it as I am sure its come up.

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by JNeuhoff » Thu Feb 18, 2021 12:57 am

I think he's right! I just tested it with the demo data on an OC 3.0.2.0 and 3.0.3.6, it shouldn't allow a page with a URL ending in 'laptop-notebook/samsung-galaxy-tab-10-1' because the 'samsung-galaxy-tab-10-1' doesn't belong to the 'laptop-notebook' category!

In fact, the same issue is true with categories. E.g. something like 'test23/mp3-players/test23' shouldn't be possible!

How come nobody else has ever spotted this error before?

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by mikeinterserv » Thu Feb 18, 2021 1:06 am

JNeuhoff wrote:
Thu Feb 18, 2021 12:57 am
How come nobody else has ever spotted this error before?
I spotted it before :-)
BUT like many things in life nowadays you just go Oh WTF and get on with it :-)

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by straightlight » Thu Feb 18, 2021 2:49 am

JNeuhoff wrote:
Thu Feb 18, 2021 12:57 am
I think he's right! I just tested it with the demo data on an OC 3.0.2.0 and 3.0.3.6, it shouldn't allow a page with a URL ending in 'laptop-notebook/samsung-galaxy-tab-10-1' because the 'samsung-galaxy-tab-10-1' doesn't belong to the 'laptop-notebook' category!

In fact, the same issue is true with categories. E.g. something like 'test23/mp3-players/test23' shouldn't be possible!

How come nobody else has ever spotted this error before?
That's simply because store owners wipes out the core categories and products without testing the actual data and puts their own right away with the hopes not to corrupt what's being imported as a last resort.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mikeinterserv » Thu Feb 18, 2021 2:56 am

straightlight wrote:
Thu Feb 18, 2021 2:49 am
JNeuhoff wrote:
Thu Feb 18, 2021 12:57 am
I think he's right! I just tested it with the demo data on an OC 3.0.2.0 and 3.0.3.6, it shouldn't allow a page with a URL ending in 'laptop-notebook/samsung-galaxy-tab-10-1' because the 'samsung-galaxy-tab-10-1' doesn't belong to the 'laptop-notebook' category!

In fact, the same issue is true with categories. E.g. something like 'test23/mp3-players/test23' shouldn't be possible!

How come nobody else has ever spotted this error before?
That's simply because store owners wipes out the core categories and products without testing the actual data and puts their own right away with the hopes not to corrupt what's being imported as a last resort.
What the heck are you on about - are you telling developers they don't know how to add products and categories etc to OC - nonsense
What has importing got to do with anything at all - many add products manually through OC admin

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by mikeinterserv » Thu Feb 18, 2021 3:01 am

Take a look at these screenshots from OC Demo
Look at the url in the address bar
You can mess with those urls all day
and that's before SEO is enabled

Attachments

Clipboard20.jpg

Clipboard20.jpg (48.33 KiB) Viewed 1258 times

Clipboard19.jpg

Clipboard19.jpg (64.12 KiB) Viewed 1280 times

Clipboard18.jpg

Clipboard18.jpg (42.66 KiB) Viewed 1280 times


Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by adamo7812 » Thu Feb 18, 2021 4:56 am

The phenomenon is much more confusing by turning on seo urls. I just found a demo page with demo data on OC Marketplace:
The correct url looks like:
https://www.opencart-extension.com/demo8/tablet/samsung-galaxy-tab-10-1
If you change the tablet to monitor in the url the product page still opens:
https://www.opencart-extension.com/demo8/monitor/samsung-galaxy-tab-10-1

Newbie

Posts

Joined
Mon Apr 20, 2020 2:26 am

Post by straightlight » Thu Feb 18, 2021 8:15 am

mikeinterserv wrote:
Thu Feb 18, 2021 2:56 am
straightlight wrote:
Thu Feb 18, 2021 2:49 am
JNeuhoff wrote:
Thu Feb 18, 2021 12:57 am
I think he's right! I just tested it with the demo data on an OC 3.0.2.0 and 3.0.3.6, it shouldn't allow a page with a URL ending in 'laptop-notebook/samsung-galaxy-tab-10-1' because the 'samsung-galaxy-tab-10-1' doesn't belong to the 'laptop-notebook' category!

In fact, the same issue is true with categories. E.g. something like 'test23/mp3-players/test23' shouldn't be possible!

How come nobody else has ever spotted this error before?
That's simply because store owners wipes out the core categories and products without testing the actual data and puts their own right away with the hopes not to corrupt what's being imported as a last resort.
What the heck are you on about - are you telling developers they don't know how to add products and categories etc to OC - nonsense
What has importing got to do with anything at all - many add products manually through OC admin
Of course. However, it is quite rate that store owners do keep the original products out-of-the-box regardless how they're adding their own.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mikeinterserv » Thu Feb 18, 2021 8:18 am

straightlight wrote:
Thu Feb 18, 2021 8:15 am
Of course. However, it is quite rate that store owners do keep the original products out-of-the-box regardless how they're adding their own.
Most store owners NEVER keep the original data or products - this makes no difference to the problem. The problem exists regardless of any data.
It is a code issue through and through. There are too many bright minds around OC to not be able to solve it somehow. I will look more closely myself

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by paulfeakins » Thu Feb 18, 2021 5:53 pm

Yes of course this has been spotted before, you need to search for "canonical URL" extensions.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by adamo7812 » Thu Feb 18, 2021 6:54 pm

paulfeakins wrote:
Thu Feb 18, 2021 5:53 pm
Yes of course this has been spotted before, you need to search for "canonical URL" extensions.
Do I really need to buy an add-on to fix this error?

Newbie

Posts

Joined
Mon Apr 20, 2020 2:26 am

Post by mikeinterserv » Thu Feb 18, 2021 7:08 pm

paulfeakins wrote:
Thu Feb 18, 2021 5:53 pm
Yes of course this has been spotted before, you need to search for "canonical URL" extensions.
Yes that's a joke right

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by xxvirusxx » Thu Feb 18, 2021 8:06 pm

adamo7812 wrote:
Thu Feb 18, 2021 12:31 am
The correct URL is:
https://farm-shop.hu/orsok/elsofekes-or ... 1bb_D56667
And if I change "orsok" to "botok" it also shows the product:
https://farm-shop.hu/botok/elsofekes-or ... 1bb_D56667
That product is in the both category?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by mikeinterserv » Thu Feb 18, 2021 8:12 pm

xxvirusxx wrote:
Thu Feb 18, 2021 8:06 pm
That product is in the both category?
No it isn't
It is very easy for you to check yourself
You can display any product in ANY category

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by adamo7812 » Thu Feb 18, 2021 8:19 pm

xxvirusxx wrote:
Thu Feb 18, 2021 8:06 pm
adamo7812 wrote:
Thu Feb 18, 2021 12:31 am
The correct URL is:
https://farm-shop.hu/orsok/elsofekes-or ... 1bb_D56667
And if I change "orsok" to "botok" it also shows the product:
https://farm-shop.hu/botok/elsofekes-or ... 1bb_D56667
That product is in the both category?
This is a product that has been assigned to only one category. But by changing the URL, it can be seen through all categories.
Category path valid in my example: / orsok / elsofekes-orso /
But if you change "orsok" to "botok", the product will also appear while the product is not related to the "botok" category ...
You can swap categories in the URL and the product page will still open. But it only happens with existing categories.

Newbie

Posts

Joined
Mon Apr 20, 2020 2:26 am

Post by xxvirusxx » Thu Feb 18, 2021 8:20 pm

I saw. Same bug on Master Branch.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by adamo7812 » Thu Feb 18, 2021 8:22 pm

I posted it as a New issue on GitHub.
Let's see what happens.

Newbie

Posts

Joined
Mon Apr 20, 2020 2:26 am
Who is online

Users browsing this forum: No registered users and 16 guests