Author Topic: Wrong multicategory product url from base category  (Read 561 times)

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Wrong multicategory product url from base category
« on: July 25, 2020, 11:46:08 am »
I heve problem with multicategory products urls.
For examle i have Product A in Base category -> Category A and Category B. In the settings of Product A set Force canonical category to Category A. But URL of this product from base category is to ategory B! Why and how can i fix this?
Joomla! 3.9.20, VirtueMart 3.8.4 10335

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3683
  • using Matomo instead of Google Analytics
Re: Wrong multicategory product url from base category
« Reply #1 on: July 25, 2020, 12:19:01 pm »
My first guess is that Cloudflare's 'Rocket Loader' and/or their 'Super Cache' might cause that problem.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #2 on: July 25, 2020, 12:41:06 pm »
No, at my local server the same problem.

jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3683
  • using Matomo instead of Google Analytics
Re: Wrong multicategory product url from base category
« Reply #3 on: July 25, 2020, 16:23:59 pm »
Eventually the problem is that (some) of your product language tags are not set for Russian if one selects a product in Russian language.
Long time ago some people in this forum also reported 'canonical' problems when using a T3 template.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #4 on: July 26, 2020, 08:09:06 am »
The canonical link is correct on the page. But the product link is not correct from the parent category and does not match the conanic link.

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #5 on: July 28, 2020, 12:33:07 pm »
For example:
The canonical URL is correct on the page. But the product URL is not correct from the parent category and does not match the canonical link.
This is the product URL: https://motobrat.com.ua/mototyuning/tun-suzuki/zadnie-dugi-mototsikla-suzuki-intruder-volusia-2c-c800-2c-c50-detail.html
The canonical URL is https://motobrat.com.ua/mototyuning/dugi/zadnie-dugi-mototsikla-suzuki-intruder-volusia-2c-c800-2c-c50-detail.html
Url must be the same like canonical URL.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 555
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Wrong multicategory product url from base category
« Reply #6 on: July 28, 2020, 13:31:31 pm »
Show admin setup for this product (category, canonical category).
If you not send, then it is only academic debate :)

And info if you use any SEF app.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #7 on: July 28, 2020, 19:47:53 pm »
I dont use another sef component.
Here is screenshot of product configuration.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
regards
A

Joomla 3.9.20
php 7.3

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #9 on: July 29, 2020, 12:12:55 pm »
I didn’t say that the canonical url is not correct. incorrect link to a product from the canonical category. Here is a link to the category.
For base ctegory URL https://motobrat.com.ua/mototyuning/dugi.html
Proudct URLmust be https://motobrat.com.ua/mototyuning/dugi/zadnie-dugi-mototsikla-suzuki-intruder-volusia-2c-c800-2c-c50-detail.html
Like canonical URL.
Now the product URL from another category https://motobrat.com.ua/mototyuning/tun-suzuki/zadnie-dugi-mototsikla-suzuki-intruder-volusia-2c-c800-2c-c50-detail.html
In other words, the actual url must match the canonical one, so that product pages that are added in several categories will open in the same category that is specified in the product settings as canonical.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 555
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Wrong multicategory product url from base category
« Reply #10 on: July 29, 2020, 19:08:12 pm »
> In other words, the actual url must match the canonical one, so that product pages that are added in several categories will open in the same category that is specified in the product settings as canonical.

Nop.

If you want this, I think you must use SEF app.
I see, in your T3 template all link for product is canonical - maybe is bug from template or VM.
But if you need only one link for product as active (only canonical link, other links redirect to this), then you need SEF app - I use Artio SEF.

In other words, if you go in non-canonical product category and then click on product link, you see non-canonical link - URL not changed to canonical link.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: Wrong multicategory product url from base category
« Reply #11 on: July 29, 2020, 19:20:24 pm »
Quote
In other words, the actual url must match the canonical one, so that product pages that are added in several categories will open in the same category that is specified in the product settings as canonical.

That is not how VM works when it displays products that are in multiple categories

What you see it doing is how it works.

The canonical just allows you to force a "main" category in the canoncal url instead of allowing VM to do it base on the lowest category_id number

regards
A

Joomla 3.9.20
php 7.3

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #12 on: July 29, 2020, 20:40:46 pm »
I apologize for my poor English, maybe I was not able to convey the essence of the problem or you are trying to shift the responsibility, advising me to use other SEF components that will give additional load on the server and given the heavy and not sufficiently optimized component of Virtuemart, the site will work very slowly ...
One thing I don't understand is why you insist that canonical links work correctly? I had no complaints about incorrect canonical links. I just asked by what logic is the product A, which is in category A and category B, which has a canonical link to category A and an actual link to category B?
Why does a VM SEF router work like that? After all, a buyer who enters category A sees Product A, enters the link and goes to the product page, which is located in category B by the actual link. On the product page, following the links "next product" and "previous product", the buyer will not find products from category A, which are not sloping correctly. This is not only a matter of SEO, but also of site usability.
Opening a topic on the forum, I just asked how can I fix this? I have not asked anyone to do this, I will do it myself. But first I asked the developers of this component, who know the structure of their component and could suggest in which file and on which line to fix it.
Instead, I see advice to switch to a different SEF component ...

motobrat

  • Beginner
  • *
  • Posts: 16
  • A beginner
Re: Wrong multicategory product url from base category
« Reply #13 on: July 29, 2020, 20:47:50 pm »
That is not how VM works when it displays products that are in multiple categories

What you see it doing is how it works.

The canonical just allows you to force a "main" category in the canoncal url instead of allowing VM to do it base on the lowest category_id number

Apparently Virtuemart knows better which link a webmaster should install on a product and from which category. Apparently the developers were guided by this logic. Can this be changed somehow?

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3252
  • VirtueMart Version: 3.8.4
Re: Wrong multicategory product url from base category
« Reply #14 on: July 30, 2020, 10:35:30 am »
I do not advise using any other plugin VM

Quote
I just asked by what logic is the product A, which is in category A and category B, which has a canonical link to category A and an actual link to category B?

Yes, that seems pretty logical to most users and good practice!

Quote
Apparently Virtuemart knows better which link a webmaster should install on a product and from which category. Apparently the developers were guided by this logic. Can this be changed somehow?

VM creates its links for products - correct. That is clearly not what you want.

If you want something different you can do your own bespoke coding - maybe someone else can guide you.
regards
A

Joomla 3.9.20
php 7.3