- Posts: 86231
- Thank you received: 14224
Issue ith canonical URLs
2 years 11 months ago #355856
by nicolas
Replied by nicolas on topic Issue ith canonical URLs
Hi,
Then I'm not sure what the change should be. It would require some debugging of the Language Filter plugin.
Then I'm not sure what the change should be. It would require some debugging of the Language Filter plugin.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355894
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
Hi Nicolas,
There's something that is confusing to me.
The canonical URLs work fine for one collection and not for the others. I can't understand why it's not consistent.
For the moment, as a temporary solution I disabled the "alternate" feature in the language filter plugin to have the canonical URLs displayed in the source code.
There's something that is confusing to me.
The canonical URLs work fine for one collection and not for the others. I can't understand why it's not consistent.
For the moment, as a temporary solution I disabled the "alternate" feature in the language filter plugin to have the canonical URLs displayed in the source code.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355909
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
Me again.
I have another site in 2 languages and on this one no problem, canonical URLs work and alternate URL too. So it should be something within the site which prevents things to work as expected
Sandra
I have another site in 2 languages and on this one no problem, canonical URLs work and alternate URL too. So it should be something within the site which prevents things to work as expected
Sandra
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356073
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
Hi,
I just noticed another issue with canonical URLs.
Even with Add Alternate Meta Tags on NO, the canonical URLs are not correct.
In the default language (US), it's ok, but not in French, the canonical URL remains the same as you can see for example on this page:
rolex.jewelrygoldfinger.com/fr/collection/yacht-master
The canonical URL should contain "fr" but it doesn"t. In fact it displays the canonical URL set up on the main screen and not the one set up in the French screen,
I'm really not sure it's an issue with the plugin.
I really need to be able to solve this issue but I have no clue how.
Thanks in advance for your help.
Sandra
I just noticed another issue with canonical URLs.
Even with Add Alternate Meta Tags on NO, the canonical URLs are not correct.
In the default language (US), it's ok, but not in French, the canonical URL remains the same as you can see for example on this page:
rolex.jewelrygoldfinger.com/fr/collection/yacht-master
The canonical URL should contain "fr" but it doesn"t. In fact it displays the canonical URL set up on the main screen and not the one set up in the French screen,
I'm really not sure it's an issue with the plugin.
I really need to be able to solve this issue but I have no clue how.
Thanks in advance for your help.
Sandra
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356086
by nicolas
Replied by nicolas on topic Issue ith canonical URLs
Hi,
Indeed, I can see the translation of the canonical URL is ignored. I've made a patch which should fix the problem.
Download again the install package of the 5.0.0 and install it on your website and you'll get the patch.
Indeed, I can see the translation of the canonical URL is ignored. I've made a patch which should fix the problem.
Download again the install package of the 5.0.0 and install it on your website and you'll get the patch.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356088
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
Thanks a lot Nicolas. It works, 'fr' is now in the canonical URL.
I also noticed something (no clue if it can be of any help):
- Add Alternate Meta Tags on YES
- Remove URL Language Code on NO
For the default language (US), it's all good, canonical + alternate
In the second language (so here French), canonical is missing
Sandra
I also noticed something (no clue if it can be of any help):
- Add Alternate Meta Tags on YES
- Remove URL Language Code on NO
For the default language (US), it's all good, canonical + alternate
In the second language (so here French), canonical is missing
Sandra
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356093
by nicolas
Replied by nicolas on topic Issue ith canonical URLs
Hi,
Isn't that the same problem we were talking about since the beginning of this thread ?
Isn't that the same problem we were talking about since the beginning of this thread ?
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356133
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
Hi Nicolas,
Yes, it's part of the problem.
Yes, it's part of the problem.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356138
by nicolas
Replied by nicolas on topic Issue ith canonical URLs
Hi,
Well, if you can provide a backend and a FTP access, I can have a deeper look into it and maybe try to understand what can be done to fix the problem. If we provide a correct patch to the Joomla project, they'll be more reactive and integrate it in Joomla.
Well, if you can provide a backend and a FTP access, I can have a deeper look into it and maybe try to understand what can be done to fix the problem. If we provide a correct patch to the Joomla project, they'll be more reactive and integrate it in Joomla.
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356146
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
With pleasure!
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356157
by nicolas
Replied by nicolas on topic Issue ith canonical URLs
Hi,
I think I found the solution.
Adding the line:
before the line:
in the file /plugins/system/languagefilter/src/Extension/LanguageFilter.php seems to do the job.
I think I found the solution.
Adding the line:
Code:
if($i !== $this->current_lang)
Code:
$doc->addHeadLink($server . $language->link, 'alternate', 'rel', ['hreflang' => $i]);
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356181
by Sandra74
Replied by Sandra74 on topic Issue ith canonical URLs
Hi Nicolas,
You rock!
It works like a charm.
Thank you so much!
Sandra
You rock!
It works like a charm.
Thank you so much!
Sandra
Please Log in or Create an account to join the conversation.
Time to create page: 0.263 seconds