Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

languagefilter-plugin bug - outputs wrong alternate-link when "Remove URL Language Code" option in ON #44860

Open
jokorntheuer opened this issue Feb 11, 2025 · 2 comments

Comments

@jokorntheuer
Copy link

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

@fgsw
Copy link

fgsw commented Feb 12, 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?

@jokorntheuer jokorntheuer changed the 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 Feb 12, 2025
@fgsw
Copy link

fgsw commented Feb 12, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants