?
avatar scence
scence
23 Mar 2016

I've updated joomla to 3.5.0 and have duplicate canonical on a product page now:

"link href="/index.php/shop/store-frontpage/t-shirt-s/66-n-t-shirt-49-detail" rel="canonical" />
link href="/index.php/shop/store-frontpage/t-shirt-s/66-n-t-shirt-49-detail?limitstart=0&limit=int" rel="canonical" />"

There is a testing page:
http://storebox.bambi.by/index.php/shop/store-frontpage/t-shirt-s/66-n-t-shirt-49-detail

I wonder how I could delete the second rel.

avatar scence scence - open - 23 Mar 2016
avatar SharkyKZ
SharkyKZ - comment - 24 Mar 2016

Update VirtueMart to 3.0.14 first. It had some router changes done, including removal of limitstart and limit from product URLs.

avatar chivitli
chivitli - comment - 24 Mar 2016

I detected double canonicals as well for my custom component, now Joomla adds a second canonical where it didn't before, only the canonical I added myself was present. It's the same issue as with Virtuemart (even the latest version, doesn't matter).

I also lost the ability to unset Joomla generated canonical in K2 through K2 plugins, but this would work again if I change the event Joomla sef uses back to onAfterRoute and change back to JFactory to get $app and $doc objects. However this does not fix the double canonical for a custom component. @andrepereiradasilva, since you made the performance optimization, could you confirm what impact would reverting just this part have on the performance?

avatar chivitli
chivitli - comment - 24 Mar 2016

Also, Joomla still does not generate proper canonicals. Let's take the main site as an example:

For https://www.joomla.org/announcements/release-news/5654-joomla-3-5-is-here.html the canonical link set is the same, that's good. But what if alias changed? For the same page on https://www.joomla.org/announcements/release-news/5654-joomla-3-5-is-heeeeeeeeeeeeere.html canonical link becomes <link rel="canonical" href="/announcements/release-news.html?catid=5654&id=5654:joomla-3-5-is-here">. That's not good.

avatar scence
scence - comment - 24 Mar 2016

I've updated VirtueMart to 3.0.14 and I have the same problem still (without "?limitstart=0&limit=int" in the end of url now):

link href="http://storebox.bambi.by/index.php/shop/store-frontpage/t-shirt-s/66-n-t-shirt-49-detail" rel="canonical" />
<link href="/index.php/shop/store-frontpage/t-shirt-s/66-n-t-shirt-49-detail" rel="canonical"
_
I need to remove the second rel _<link href="/index.php/shop/store-frontpage/t-shirt-s/66-n-t-shirt-49-detail" rel="canonical

avatar SharkyKZ
SharkyKZ - comment - 24 Mar 2016

Going back to #9333, assuming @ggppdk is correct, canonical should be made absolute even if no domain is set in plugin parameters. This would solve the issue scenario above (since URLs are the same except one is absolute, other is relative). Although the issue of removing canonical generated by plugin in favor of component remains.

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Mar 2016

Please test #9565

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Mar 2016

@brianteeman i think you can close this as we have a PR.
@scence please test if that PR solves the issue too.

avatar brianteeman brianteeman - change - 24 Mar 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-03-24 15:42:41
Closed_By brianteeman
avatar brianteeman brianteeman - close - 24 Mar 2016
avatar brianteeman brianteeman - close - 24 Mar 2016
avatar scence
scence - comment - 26 Mar 2016

I've reinstalled all updates and everything is ok now (one right rel canonical):

view-source:http://storebox.bambi.by/index.php/shop/t-shirt-s/66-n-t-shirt-49-detail

thanks everybody for help

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Mar 2016

@sence, sorry i don't understand. did you test with this (https://github.com/joomla/joomla-cms/pull/9565/files) changes?

Add a Comment

Login with GitHub to post a comment