No Code Attached Yet bug
avatar jjnxpct
jjnxpct
2 Aug 2025

While running a multilingual Joomla 5.3.2 website on PHP 8.4.8, the following warnings appears in the server logs during normal frontend page access:

PHP Warning: Undefined array key "language" in /plugins/system/sef/src/Extension/Sef.php on line 122

Environment:
Joomla version: 5.3.2
PHP version: 8.4.8 (FPM under LiteSpeed)
Site setup: Multilingual site with SEF enabled
Plugin: System - SEF is enabled with default settings

Please let me know if further details are needed.

avatar jjnxpct jjnxpct - open - 2 Aug 2025
avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2025
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Aug 2025
avatar richard67
richard67 - comment - 4 Aug 2025

The fix could be to extend the if ($app->getLanguageFilter()) condition here https://github.com/joomla/joomla-cms/blob/5.3-dev/plugins/system/sef/src/Extension/Sef.php#L121-L124

so it is if ($app->getLanguageFilter() && isset($parsedVars['language'])) {

or maybe if ($app->getLanguageFilter() && !empty($parsedVars['language'])) {.

@Hackwar What do you recommend?

avatar Hackwar
Hackwar - comment - 5 Aug 2025

Sounds good.

avatar mckillo
mckillo - comment - 21 Aug 2025

I’m getting the same warning.

Environment: Joomla version: 5.3.3, PHP version: 8.2.12

Fix: Update line 121 to:
if ($app->getLanguageFilter() && isset($parsedVars['language'])) {

avatar Fedik Fedik - change - 21 Aug 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-08-21 19:17:25
Closed_By Fedik
avatar Fedik Fedik - close - 21 Aug 2025
avatar Fedik
Fedik - comment - 21 Aug 2025

It is included in #45947
Please test

avatar Fedik Fedik - change - 21 Aug 2025
Labels Added: bug
avatar Fedik Fedik - labeled - 21 Aug 2025
avatar mckillo
mckillo - comment - 21 Aug 2025

This line if ($app->getLanguageFilter() && isset($parsedVars['language'])) is part of a commit (#45947), and it works (tested).
The commit includes another change, but that one is for Joomla 6.0 and does not apply to Joomla 5.3.3.

avatar richard67
richard67 - comment - 21 Aug 2025

@Fedik Sure we can close this issue for 5.3.3 with a 6.0 PR?

avatar Fedik Fedik - change - 21 Aug 2025
Status Closed New
Closed_Date 2025-08-21 19:17:25
Closed_By Fedik
avatar Fedik Fedik - reopen - 21 Aug 2025
avatar Fedik
Fedik - comment - 21 Aug 2025

Ah, sorry, I forgot my PR is for 6.0 šŸ˜„

avatar richard67 richard67 - close - 21 Aug 2025
avatar richard67
richard67 - comment - 21 Aug 2025

Closing as having a pull request. @jjnxpct @mckillo Please test #45959 . Thanks in advance.

avatar richard67 richard67 - change - 21 Aug 2025
Status New Closed
Closed_Date 0000-00-00 00:00:00 2025-08-21 20:01:25
Closed_By richard67
avatar richard67
richard67 - comment - 21 Aug 2025

Ah, sorry, I forgot my PR is for 6.0 šŸ˜„

@Fedik Yes, and it is good there as it fixes also another issue introduced in 6.0 only. Thanks for that PR.

Add a Comment

Login with GitHub to post a comment