SEF Active "force canonical URLs on listings" with several canonical

  • Posts: 84
  • Thank you received: 13
  • Hikashop Business
4 years 11 months ago #317057

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16

Hi,
several product accessible through different categories, but each url presents different canonical urls, instead of showing only the entered canonical
I have SEF configured with "force canonical URLs on listings"
There is no sef plugin installed, except joomla.

Thanks
Javier


Javier Ballester

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 11 months ago #317060

Hi,

Then either you have an old view override of the file product / listing_img_title.php which doesn't take into account the canonical URL as this field and the force canonical URL setting didn't exist before; or you're accessing the product page from something listing the products without taking into account the canonical URL (for example, a third party product listing carousel module).
I can see that the canonical URL of the product of your example corresponds to the first link you provided. So the question is where did you find the second URL which doesn't correspond to the canonical URL ?

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

  • Posts: 84
  • Thank you received: 13
  • Hikashop Business
4 years 10 months ago #317807

Hi, solved.
I've already encountered the problem that recurs every time I update the template.
The canonical is duplicated and built via template and via component. Editing the template index can cancel the canonical line and problem solved
https://www.joomshaper.com/forums/double-canonical-links-how-to-avoid
This problem had happened to me some time ago with this template.. I think that templates and components should communicate so that the canonical indicated by the user always prevails. If we consider any url canonical, it makes no sense that canonical exist.

Best regards
Javier


Javier Ballester

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

  • Posts: 83409
  • Thank you received: 13502
  • MODERATOR
4 years 10 months ago #317811

Hi,

Yes. The problem is that there is no mechanism in Joomla's API to communicate the canonical URL. That's why HikaShop has to add it. Even worst, the SEF system plugin can be configured to add the current URL of a page as canonical URL on all the pages of the website, which defeat the purpose of "canonical URLs" which has to be unique for different pages with the same content.
Similarly, I don't see why the template would add the canonical URL tag itself to all the pages as being the current page. But maybe they have a good reason for this ?
Anyways, it's great that the problem is solved for you.

The following user(s) said Thank You: Jabatec

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

Time to create page: 0.065 seconds
Powered by Kunena Forum