Skip to content

Wrong behaviour with LanguageSwitcher #3932

@HoloBack

Description

@HoloBack

Hi @rhukster,

my website has German as a default language and English as a second language.
When I have a page available in both languages, then languageswitcher and the hreflang links are working correctly.

When I create a page just in English, Grav creates a virtual link for German (Language N/A) even though there is no German page and then languageswitcher creates the virtual links which, of course, lead to 404.

So when I switch language, it leads to an virtual link of a page, that doesn't exist.
Same for the hreflang links - alternate and x-default links are created with that virtual link.

Is that a bug or how can be that behaviour changed?

All the best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions