No Code Attached Yet
avatar jokorntheuer
jokorntheuer
11 Feb 2025

Steps to reproduce the issue

I have a live-website to reproduce the issue. it is in fact why i discovered this issue.
i have installed 2 languages for this site:
DE & EN-GB
the site was only German before we added an english language. Be aware, the english version is dedicated to english-speaking people in Austria. this is why the language tag outputs "en-AT" in the html-document.

The german homepage is:
https://www.hautarzt-vienna.at/
and outputs the following alternate-lang urls in the header:
link href="https://www.hautarzt-vienna.at/en" rel="alternate" hreflang="en-AT"
link href="https://www.hautarzt-vienna.at/" rel="alternate" hreflang="de-AT"

this is correct.

but when I switch to the homepage of the English version:
https://www.hautarzt-vienna.at/en
the output is:
link href="https://www.hautarzt-vienna.at/en" rel="alternate" hreflang="en-AT"
link href="https://www.hautarzt-vienna.at/de" rel="alternate" hreflang="de-AT"

which is wrong.

### Expected result

the english version should output:
link href="https://www.hautarzt-vienna.at/" rel="alternate" hreflang="de-AT"
instead of:
link href="https://www.hautarzt-vienna.at/de" rel="alternate" hreflang="de-AT"

also important - this "/de" part of the url seems only to be added on the homepage.
if you look at other pages on the website, the "/de" part is absent again in the alternate-urls.

Actual result

System information (as much as possible)

joomla 5.2.3.
i have only 1 menu (all languages) for DE & EN dedicated menu links in it. If i remeber right this is a new feature that you do not have to create 2 seperate menus for each language.

Additional comments

avatar jokorntheuer jokorntheuer - open - 11 Feb 2025
avatar jokorntheuer jokorntheuer - change - 11 Feb 2025
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 11 Feb 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Feb 2025
avatar fgsw
fgsw - comment - 12 Feb 2025

@jokorntheuer Please change in the title "Url-Sprachkürzel entfernen" to "Remove URL Language Code" as English is used in this Repository.

Can you also link to the Forum-thread you have asked for support?

avatar jokorntheuer jokorntheuer - change - 12 Feb 2025
Title
languagefilter-plugin bug - outputs wrong alternate-link when "Url-Sprachkürzel entfernen" option in ON
languagefilter-plugin bug - outputs wrong alternate-link when "Remove URL Language Code" option in ON
avatar jokorntheuer jokorntheuer - edited - 12 Feb 2025
avatar fgsw
fgsw - comment - 12 Feb 2025

@jokorntheuer The Pull Request #43858 refactor the routing of Languagefilter. Can you test if it solve your reported Issue?

Add a Comment

Login with GitHub to post a comment