Canonical URL not SEF

  • Posts: 5
  • Thank you received: 0
8 years 9 months ago #246928

-- HikaShop version -- : 2.6.3

I pointed the Canonical URL of one category with raw link like "index.php?Itemid=XX", the URL of category shows "index.php?Itemid=XX", not the SEF URLs, while I hit the items of this category, the URLs changed to SEF URLs, no "index.php?Itemid=XX" any more.

Shouldn't the Joomla plugin 'System - SEF' will auto-convert such links to correct URLs ALWAYS which will reflect current menu item alias?

What should I do if I want the SEF URLs for the category too? please don't tell me to enter the SEFed URLs directly to the canonical URL, it will not fit my needs.

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

  • Posts: 83860
  • Thank you received: 13578
  • MODERATOR
8 years 9 months ago #246936

Hi,

So your issue is with the SEF plugin of Joomla not HikaShop.
Yes, it is supposed to replace the URLs automatically to SEF URLs.
You can see that in its code:
take.ms/7amXb
So when the page is at the end of the processing, it gets all the URLs starting with index.php in the href attributes of the page and SEF them with the call to JRoute::_
This also requires that the SEF setting of the Joomla configuration is activated as you can read in the code.

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

  • Posts: 5
  • Thank you received: 0
8 years 9 months ago #247005

Nope, my problem is with Hikashop.

I entered the Canonical URL with "index.php?Itemid=216", because I want to use the raw link here, the SEF URLs changes with the alias, so I don't want to use it here.

But in the front of website, it shows " www.mydomain.com/index.php?Itemid=216 ", should not it change to SEF URL automatically? the SEF plugin of Joomla is activated.

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

  • Posts: 83860
  • Thank you received: 13578
  • MODERATOR
8 years 9 months ago #247014

Hi,

If you enter "index.php?Itemid=216" in the canonical URL field, HikaShop will display www.mydomain.com/index.php?Itemid=216 as the URL of the product/category. And as you said, the SEF plugin will convert that URL to the SEF URL of the menu item 216. If that's not the case and you see www.mydomain.com/index.php?Itemid=216 , it means that the SEF plugin is not doing its job but HikaShop is since it is using your canonical URL but the SEF plugin is not SEFing it.
So I don't see why you would think that the problem is with HikaShop here ?

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

  • Posts: 5
  • Thank you received: 0
8 years 9 months ago #247067

I'm not arguing whose responsibility is.

I didn't want to use SEF URL in the canonical URL field, because I may need to move the website from one domain to another, or change the menu alias sometimes.

Is there any other solution except the "index.php?Itemid=XXX" way?

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

  • Posts: 83860
  • Thank you received: 13578
  • MODERATOR
8 years 9 months ago #247073

Hi,

Moving the website from one domain to another won't change anything for the canonical URLs since you don't enter the domain name in that setting. It is added dynamically.
And if you enter the URL with the Itemid, the SEF URL will be calculated automatically by Joomla's SEF plugin so you could change the menu alias.

Now if you leave the canonical URL empty, HikaShop will calculate itself the SEF URL of the category. So if your goal is to have a completely dynamic URL without having to enter a canonical URL, that's also possible.

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

Time to create page: 0.045 seconds
Powered by Kunena Forum