Hi all,
is there any reason why we do not append the Itemid to the return URL in the login module? I can choose a menu item where I want to get users redirected after login and logout from the select box in the backend module options and it sets the return URL into the module form in the frontend. But without an Itemid the page where I will be redirected to does not contain the modules that are assigned to this page.
This is the code in the modules/mod_login/helper.php:
public static function getReturnURL($params, $type)
{
$app = JFactory::getApplication();
$item = $app->getMenu()->getItem($params->get($type));
if ($item)
{
$vars = $item->query;
}
else
{
// Stay on the same page
$vars = $app::getRouter()->getVars();
}
return base64_encode('index.php?' . JUri::buildQuery($vars));
}
$item->query does only contain all query variables from the menu item except the Itemid. A simple fix could be to add another line with $vars['Itemid'] = $item->id after it.
Would something like this be possible or is there anything that I am missing here?
Kind regards
Florian