canonical url does not match product category

  • Posts: 96
  • Thank you received: 6
  • Hikashop Business
6 years 2 months ago #287140

-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.4
-- PHP version -- : 7
-- Browser(s) name and version -- : Chrome 64.0.3282

I changed the HikaShop setting to "use canonical URL and generate if missing", see take.ms/XqxzY

Up until then the canonical field had been empty in each product.

I discovered some weird behavior with the URL created since changing that setting, i.e. /mirrors-wall-decorations/pub-signs is added to products at what appears to be randomly and that do not fall into the mirrors and wall decorations and pub sign categories.

Please see this screencast: screencast-o-matic.com/watch/cFnncYoa1g

Is there a way to determine what is causing this and other than manually going through every product, how can this be repaired?

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 15
6 years 2 months ago #287168

Confirm and I have this problem after updating to joomla 3.8.4.(Tested by HikaShop and HikaMarket. I think that the other has this problem now.)

Last edit: 6 years 2 months ago by neo191987.

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 15
6 years 2 months ago #287172

The problem is from Joomla 3.8.4, not Hika's products. There is a problem with Router and will be fixed in the next version of Joomla.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 2 months ago #287162

Hi,

When you set that option to "use canonical URL and generate if missing" and that the canonical URL field of the product/category are empty, then, the first time a module or menu has to display the link to that product/category, the system will fall back in "no, generate it" and take that URL and put it in the canonical URL field of the product/category. The next time HikaShop has to display a link to that product/category it will be able to directly use the canonical URL.
So if you configured different menus and modules to access the products, with that option deactivated, you can see that different links are used. Among them, one of them is that link that HikaShop used as canonical URL.
If that link is not to your liking, then you need to enter the link you want instead.
The best here is that when you products/categories canonical URL field is empty and you activate that option, you can directly browse your website to the different products listings using the menu/module which generates normally the links you want as canonical URLs. That way, HikaShop will be able to pickup these links as canonical URLs instead of other links.
And if you want to clear all the canonical URLs of your categories/products, you can use the mass actions system for that:
www.hikashop.com/support/documentation/167-massaction-form.html
www.hikashop.com/forum/content-creation/...s-from-hikashop.html

The following user(s) said Thank You: karendunne

Please Log in or Create an account to join the conversation.

  • Posts: 250
  • Thank you received: 7
6 years 2 months ago #287218

One would have thought the link to a particular product would be the same regardless of which component or module it came from but no.. the only way I have found to make consistent and logical URL's that follow the product / category hierarchy is to add the canonical URL's manually - or import from a csv file. It's a bit of a pain if you have a lot of products.

Ian

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 2 months ago #287252

Hi,

Yes, that's the problem of the router system of Joomla to generate the URLs.
You would have the same problem with Joomla articles if you configured your website in a way that you can access them from different paths.
We had high hopes for the new router system but for now it's not the holy grail we thought it would be.

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 15
6 years 2 months ago #287260

I was talking to Joomla developers. Tomorrow will release patch.

Please Log in or Create an account to join the conversation.

  • Posts: 96
  • Thank you received: 6
  • Hikashop Business
6 years 2 months ago #287341

Thanks Nicolas,

I'm not clear on how the canonical url was generated as you described. As an example (mentioned above), there are products that have /mirrors-wall-decorations/pub-signs/ as part of their URL, but those products would never have been with those menu items. I ask because I'm trying to track down the ones that are non-sensible.

I will likely to the mass action to clear them; still need to read through the documentation on how to do that.

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 2 months ago #287349

Hi,

Well, either the canonical URL was generated automatically by HikaShop on/for that menu item or you've added manually the URL yourself. There is no other reason.
For example if you have configured that menu item in the menu setting of a module, it's possible that the module generated that URL for that product if it was displayed by the module.

Please Log in or Create an account to join the conversation.

  • Posts: 96
  • Thank you received: 6
  • Hikashop Business
6 years 2 months ago #287793

I was able to clear all the canonical URLs via the mass action.

To expedite learning how to do this for others, see this screen shot for the settings to clear all canonical URLs from all products: take.ms/uRb3J

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum