?
avatar fdesanto
fdesanto
26 Jan 2017

Steps to reproduce the issue

  • Joomla Fresh Installation
  • Create a menu item of type Users->Logout from backend and set redirect to "Home Page"
  • Enable "Allow user registration" in com_user options from backend
  • CASE1: Into frontend try to put wrong credentials
  • CASE2: From a login module, click to link "Create an Account"

Expected result

  • RESULT1: Redirect to login page with wrong credentials message
  • RESULT2: Redirect to registration page

Actual result

  • RESULT1: Redirect to home page
  • RESULT2: Redirect to home page

System information (as much as possible)

This problem happen because functions like: JRoute::_('index.php?option=com_users&view=login') or JRoute::_('index.php?option=com_users&view=registration') inherits Itemid of logout menu item (when missing menu item of type Users->Login or Users->Registration).

avatar fdesanto fdesanto - open - 26 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jan 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 Jan 2017
avatar infograf768
infograf768 - comment - 26 Jan 2017

Have you tested this on staging/3.7. alapha2?

avatar fdesanto
fdesanto - comment - 26 Jan 2017

Hi,
I have tested on 3.7.0-dev and 3.6.5

avatar fdesanto
fdesanto - comment - 26 Jan 2017

Redirect to home page happen also when you try to use the link to create an account from login page:

How to reproduce

  • Go to index.php?option=com_users&view=login (not SEF)
  • You will show a login form
  • Click to link "Don't have an account?"
    RESULT: Redirect to home page
avatar fdesanto
fdesanto - comment - 30 Jan 2017

Hi,
confirmed, this happen also on staging/3.7. alpha2

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 30 Jan 2017

Cannot confirm Issue. On latest staging tested on

  • Login-Menu (Login-Module disabled): Click on Don't have an account opens /index.php/login?view=registration
  • Login-Module (Login-Menu disabled): Click on Create an account opens /index.php/component/users/registration?Itemid=101
avatar fdesanto
fdesanto - comment - 30 Jan 2017

Hi @franz-wohlkoenig,
of course,
your first case: you have a menu item of type Users->Login, the bad behavior happen when you does not have any other menu item from com_users (only logout menu item).
your second case: seems that you not have a menu item of type Users->logout (with redirect url), otherwise you will have a link like "/logout/?view=registration"

with only logout menu item you have this routing (with SEF)
profile page: /logout/?view=profile
edit profile: /logout/?view=profile&layout=edit
registration: /logout/?view=registration
login: /logout/?view=login

but if is set also a redirect parameter for logout menu item then above links go to redirect Url

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Feb 2017

CASE1: Into frontend try to put wrong credentials

What happens if Logout-Menu is set on public:

Legacy Router

  • no SEF:
    Redirect to login page with Warning: Username and password do not match or you do not have an account yet.
  • SEF, no URL-Rewriting / SEF, URL-Rewriting:
    Redirect to Homepage page with Warning: Username and password do not match or you do not have an account yet.

Modern Router (with and without Remove IDs from URLs)

  • no SEF:
    Redirect to login page with Warning: Username and password do not match or you do not have an account yet.
  • SEF, no URL-Rewriting / SEF, URL-Rewriting:
    Redirect to Homepage page with Warning: Username and password do not match or you do not have an account yet.

Change Access of Logout-Menu on Registered got expected Result: Redirect to login page with Warning: Username and password do not match or you do not have an account yet.

avatar fdesanto
fdesanto - comment - 3 Feb 2017

Thanks franz,

Change Access of Logout-Menu on Registered got expected Result: Redirect to login page with Warning: Username and password do not match or you do not have an account yet.

Yes, it did the trick, I think that is better to add some check in the function menulogout in file /components/com_users/controllers/user.php like

public function menulogout()
{
     if(JFactory::getUser()->id)
     {
         // HERE CODE FROM menulogout
     }
}
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category Router / SEF
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Apr 2017

@fdesanto can you please confirm Issue on latest Staging?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13764.

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2017
Status New Information Required
avatar franz-wohlkoenig franz-wohlkoenig - change - 27 May 2017
Status Information Required Closed - No Reply
Closed_Date 0000-00-00 00:00:00 2017-05-27 10:31:10
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - close - 27 May 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 27 May 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 May 2017

This has been closed due to lack of response to the requests above – it can always be reopened in the future if it is updated.

Add a Comment

Login with GitHub to post a comment