-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.3.4] Undefined array key "en-GB" and Attempt to read property "sef" \plugins\system\languagefilter\languagefilter.php on line 226 #41798
Comments
Can it be that the content language for en-GB is missing? I don’t mean the language packs or extensions, I mean the content languages, that’s an extra point in the manage area of the system panel. That’s where the sef property should come from which is mentioned in the error message. |
Hello Richard, you are right: the en-GB was unpublished. After publishing it, the error disappeared. |
@peterhulst Well, I would indeed expect a useful alert instead of an uncaught exception when you enable the language filter and the content language is not published. I think that's a bug. On a multilingual site there is also a module shown in the administrator (in the default Atum template it's shown at the top) called "Multilingual Status" or so. That opens a modal which shows what's missing on a multilingual site, and it should show that the content language is not published. |
I've added a sentence about the unpublished content languages to the description (initial post) of this issue so quick readers can better see what the issue is. |
Thank you for the comment. |
Thank you Brian! |
Well that's the nice error message when you unpublish the site languages. But when you have them unpublished and enable the language filter, we have the PHP warnings. So should we leave this issue open and hope someone fixes that, too? Or shall we close it as expected behaviour? |
I created a PR. Please test #43232. Since we have a PR, I'm closing this issue. |
Steps to reproduce the issue
Expected result
Correct display website display
Actual result
A lot of warnings:
Warning: Undefined array key "en-GB" in ...\plugins\system\languagefilter\languagefilter.php on line 226
Warning: Attempt to read property "sef" on null in ...\plugins\system\languagefilter\languagefilter.php on line 226
System information (as much as possible)
Joomla 4.3.4
PHP 8.0.28, PHP 8.1.23
Additional comments
When disable the plugin language filter the warnings disappear.
The text was updated successfully, but these errors were encountered: