Skip to content

Commit

Permalink
Login to view the article redirect fix (#20732)
Browse files Browse the repository at this point in the history
Without the view=login parameter JRoute can not resolve the Itemid. 
So the menu item assigned to 'login' is not active.

Seems there is a related hack here:
/com_content/views/article/tmpl/default.php ~line 143

This can also cause problems with third party extensions like sh404sef.
  • Loading branch information
panopt authored and Michael Babker committed Jun 18, 2018
1 parent 5167b85 commit e0549de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/com_content/views/article/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function display($tpl = null)
if ($this->user->get('guest'))
{
$return = base64_encode(JUri::getInstance());
$login_url_with_return = JRoute::_('index.php?option=com_users&return=' . $return);
$login_url_with_return = JRoute::_('index.php?option=com_users&view=login&return=' . $return);
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'notice');
$app->redirect($login_url_with_return, 403);
}
Expand Down

0 comments on commit e0549de

Please sign in to comment.