Fill site domain in SEF plugin (without this canonical not write!)
Write to adress some text to request:
site-name/?sdfsfsdfs=
<link href="http://site-name/" rel="canonical" />
<link href="http://site-name/?sdfsfsdfs=" rel="canonical" />
Joomla 3.5.1, php 5.4
All work fine at joomla 3.4.8
It's not right repeats URI. And it's work correct at joomla 3.4.8.
Live check
joomla 3.5.1:
m-sumka.ru and m-sumka.ru/?sfdsdfsdf=
joomla 3.4.8:
autotuning-aks.ru and autotuning-aks.ru/?sdfsdfsdf=
At joomla 3.4.8 on url autotuning-aks.ru/?sdfsdfsdf= we get right canonical:
<link href="http://autotuning-aks.ru/" rel="canonical" />
Autotuning-aks.ru has VirtueMart for homepage which creates its own canonical URL. Try another page on the site.
E.g. no canonical is inserted here http://autotuning-aks.ru/o-kompanii.html?sdfsdfsdf=.
Wrong canonical is inserted here http://autotuning-aks.ru/index.php?option=com_content&view=article&id=5 and here http://autotuning-aks.ru/component/content/article/5
etc.
All of them use com_content one material on main page. Virtuemart can set canonical only on own pages - category, product, main page of store.
There is a problem with current cannonical implementation, under some conditions/configurations (i will open an issue for it or post here) the generated canonical URL is broken giving a 404 error, but that is a different topic
.
.
what you suggest is wrong !!
think what you are you suggesting ...
EXAMPLE 1
you suggest that this URL
http://autotuning-aks.ru/component/content/article.html?id=5
should have this cannonical
http://autotuning-aks.ru/component/content/article.html
EXAMPLE 2
http://domain/search/?seachword=test
should have this cannonical !!
http://domain/search/
Do you have a canonical domain set in SEF plugin? Because if not, the (Joomla) canonical shouldn't appear in 3.5.1 at all.
Status | New | ⇒ | Ready to Commit |
Status | Ready to Commit | ⇒ | Needs Review |
Status | Needs Review | ⇒ | Pending |
Labels |
Added:
J3 Issue
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-18 10:29:12 |
Closed_By | ⇒ | brianteeman |
Sorry I am closing this issue. The canonical option in Joomla is ONLY for the canonical domain and not the url
Yes, that's a know problem.
Basically, the canonical just repeats the URI you entered but with the other domain you entered.
See https://github.com/joomla/joomla-cms/blob/staging/plugins/system/sef/sef.php#L74
Also you can check some discussion about this here: #9565