? Pending

User tests: Successful: Unsuccessful:

avatar rdeutz
rdeutz
25 Mar 2021

Follow up on PR #29007

Summary of Changes

When the session manager is file and you are trying to log out a user in the frontend, the Log Out Button doesn't go away. The reason is that we still have a row in the session table.

The user is loged out and when you refresh the frontend the button is going away in the backend. That's kind of confusing because it looks as it hadn't worked.

Testing Instructions

  • Set session mananger to file
  • Create a user
  • Login with the user in the frontend
  • Login with a superuser account in the backend
  • Try to log out the user you are logged in in frontend

You should see that the button stays

  • Go to the frontend an refresh the page

Now you can see that the Button is not longer there after refreshing the backend

  • Apply this PR
  • Login with the user in the frontend
  • Login with a superuser account in the backend
  • Try to log out the user you are logged in in frontend

Button goes away.

Actual result BEFORE applying this Pull Request

grafik

Expected result AFTER applying this Pull Request

grafik

Documentation Changes Required

no

avatar rdeutz rdeutz - open - 25 Mar 2021
avatar rdeutz rdeutz - change - 25 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2021
Category Front End Plugins
avatar joomdonation
joomdonation - comment - 28 Mar 2021

This is not working if Force Logout for all Sessions? parameter in User - Joomla! plugin set to No. Also, maybe you should merge #29007 into your PR so that it is easier to test? @SharkyKZ deleted his branch, so it is not easy to test his PR (it could not be tested using Patch tester component)

avatar joomdonation
joomdonation - comment - 28 Mar 2021

Also, we have MetadataManager class https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Session/MetadataManager.php and as I understand, it's used to manage session meta data. I wonder if we should move the logic for deleting meta data which you added here into that class and use it?

Ignore this. It could be done in a separate PR if we want because looking more at the code, we have code to delete session meta data manually in other place, too (not via MetadataManager class) - for example, in ApplicationModel in com_config

avatar joomdonation
joomdonation - comment - 28 Mar 2021

This is not working if Force Logout for all Sessions? parameter in User - Joomla! plugin set to No

Never mind about this. Looked at the code and read #26891 again, I see that it is not possible to fix the issue with this condition.

avatar richard67
richard67 - comment - 29 Mar 2021

@rdeutz Now as PR #29007 has been merged, could you update your PR to latest 4.0-dev and set it to ready for review? Thanks in advance.

avatar rdeutz rdeutz - close - 3 Apr 2021
avatar rdeutz rdeutz - close - 3 Apr 2021
avatar rdeutz rdeutz - change - 3 Apr 2021
Labels Added: ?
avatar rdeutz rdeutz - change - 3 Apr 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-04-03 10:03:22
Closed_By rdeutz
avatar rdeutz rdeutz - change - 3 Apr 2021
Status Closed New
Closed_Date 2021-04-03 10:03:22
Closed_By rdeutz
avatar rdeutz rdeutz - change - 3 Apr 2021
Status New Pending
avatar rdeutz rdeutz - reopen - 3 Apr 2021
avatar rdeutz
rdeutz - comment - 3 Apr 2021

@richard67 thanks for the reminder, done

avatar joomdonation
joomdonation - comment - 3 Apr 2021

@rdeutz There is still one case which haven't addressed by this PR:

  • Track Session Metadata in Global Configuration set to Yes.
  • Force Logout for all Sessions? parameter in the User - Joomla! plugin set to No
  • Session Handle is not database

In this case, if user logged out himself (from frontend for example), the session meta data for his session is not being deleted, so he is still being displayed in Logged-in Users in backend dashboard. That should be fixed, something we will have to process on this block of code

$session->destroy();

avatar rdeutz
rdeutz - comment - 3 Apr 2021

@rdeutz There is still one case which haven't addressed by this PR:

I am sure there are more, but I would like to concentrate here on the issue at hand. This issue comes up when you have default settings. Let's address other situations in other PRs.

avatar joomdonation
joomdonation - comment - 3 Apr 2021

OK, fine. I will try to make a different PR to address that case later.

avatar sandramay0905
sandramay0905 - comment - 6 Apr 2021

Are no Prebuilt packages available for download because of continuous-integration/drone/pr Expected — Waiting for status to be reported?

@rdeutz PR #29007 is merged, can you please update test instructions?

avatar richard67
richard67 - comment - 6 Apr 2021

@sandramay0905 Drone seems to be hanging for this PR. That can happen in very rare cases. Will be fixed when @rdeutz will update his branch, but @rdeutz please wait with that until the 4.0-dev branch is fixed, see #33028 .

avatar sandramay0905 sandramay0905 - test_item - 27 Apr 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 27 Apr 2021

I have tested this item successfully on 7c08180


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

avatar rdeutz rdeutz - change - 27 Apr 2021
The description was changed
avatar rdeutz rdeutz - edited - 27 Apr 2021
avatar wilsonge
wilsonge - comment - 21 Jul 2021

This should be fixed after the upmerge from staging without this PR - we now use https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/User/UserHelper.php#L606 - could someone test please

avatar joomdonation
joomdonation - comment - 31 Jul 2021

@wilsonge I can confirm that the issue is not valid anymore with nightly build. So this PR could be closed.

avatar alikon
alikon - comment - 31 Jul 2021

cannot reproduce even me, so closing it

avatar alikon alikon - close - 31 Jul 2021
avatar alikon alikon - change - 31 Jul 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-07-31 09:49:09
Closed_By alikon
avatar richard67
richard67 - comment - 31 Jul 2021

Can also not reproduce.

Add a Comment

Login with GitHub to post a comment