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

InvalidArgumentException Language -1 does not exist on site in InternalLinkingSuggestion #554

Closed
abvdveen opened this issue Aug 31, 2023 · 1 comment · Fixed by #557
Closed

Comments

@abvdveen
Copy link

Using Yoast 9.0.1, you get a 503 when trying to edit a CE that uses 'All languages' - id of which is -1.
I 'fixed' this bij adding a condition and returning the default language in case the language id == -1:

        if($this->languageId != -1){
            $siteLanguage = $site->getLanguageById($this->languageId);
            return $siteLanguage->getTwoLetterIsoCode();
        }
        else return 'NL';

@RinyVT
Copy link
Collaborator

RinyVT commented Aug 31, 2023

Hi @abvdveen!

I have actually merged a pull request today that fixes the exception but displays a message that the internal linking suggestions cannot be analyzed because the language is unknown:
#544

I will have a look at the possibility to analyze the default language instead, so I'll keep this issue open :)

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