diff --git a/libraries/cms/router/site.php b/libraries/cms/router/site.php index bd6059a2f289a..668e3062c5375 100644 --- a/libraries/cms/router/site.php +++ b/libraries/cms/router/site.php @@ -581,10 +581,14 @@ protected function processBuildRules(&$uri, $stage = self::PROCESS_DURING) if ($stage == self::PROCESS_DURING) { // Make sure any menu vars are used if no others are specified - if (($this->_mode != JROUTER_MODE_SEF) && $uri->getVar('Itemid') && count($uri->getQuery(true)) == 2) + $query = $uri->getQuery(true); + if ($this->_mode != 1 + && isset($query['Itemid']) + && (count($query) == 2 || (count($query) == 3 && isset($query['lang'])))) { // Get the active menu item $itemid = $uri->getVar('Itemid'); + $lang = $uri->getVar('lang'); $item = $this->menu->getItem($itemid); if ($item) @@ -593,6 +597,11 @@ protected function processBuildRules(&$uri, $stage = self::PROCESS_DURING) } $uri->setVar('Itemid', $itemid); + + if ($lang) + { + $uri->setVar('lang', $lang); + } } }