? ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
15 Apr 2021

Pull Request for Issue #32966

Summary of Changes

Implements the session handler as a service in the CLI to fix issues when touching the session with CLI commands such as user:delete

Testing Instructions

php cli/joomla.php  user:add
test
test
test@example.xom
6

php cli/joomla.php  user:delete
test
yes

Actual result BEFORE applying this Pull Request

Bug 1:
The "session.handler" service has not been created, make sure you have created the "session" service first.

Bug 2:
The Delete users in yellow appears AFTER you have entered a username when it should be the first thing shown after typing the command like it is when you add a user.

Full context, first adding, then deleting a user:

Screenshot 2021-04-02 at 16 34 23

Expected result AFTER applying this Pull Request

User is deleted.

No red errors about the session

Documentation Changes Required

None

avatar PhilETaylor PhilETaylor - open - 15 Apr 2021
avatar PhilETaylor PhilETaylor - change - 15 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Apr 2021
Category Libraries
avatar alikon
alikon - comment - 16 Apr 2021

unable to replicate the issue when php cli/joomla.php user:delete without this pr
image

avatar PhilETaylor
PhilETaylor - comment - 16 Apr 2021

Ensure error reporting is set to development in global config. Sorry.

avatar alikon
alikon - comment - 17 Apr 2021

ahh my bad ... i've missed some merge in my test fork

avatar alikon alikon - test_item - 17 Apr 2021 - Tested successfully
avatar alikon
alikon - comment - 17 Apr 2021

I have tested this item successfully on 21e96bf


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

avatar particthistle particthistle - test_item - 17 Apr 2021 - Tested successfully
avatar particthistle
particthistle - comment - 17 Apr 2021

I have tested this item successfully on 21e96bf

Session Handler error disappears and expected behaviour occurs when patch applied.


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

avatar alikon alikon - change - 17 Apr 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 17 Apr 2021

RTC


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

avatar joomla-cms-bot joomla-cms-bot - edited - 17 Apr 2021
avatar rdeutz rdeutz - change - 19 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-19 06:24:53
Closed_By rdeutz
Labels Added: ? ?
avatar rdeutz rdeutz - close - 19 Apr 2021
avatar rdeutz rdeutz - merge - 19 Apr 2021
avatar wilsonge
wilsonge - comment - 19 May 2021

This looks really wrong - sorry I just found this PR courtesy of the cleanup in #33986 - missed it originally. We should not be starting user sessions in the CLI - if something needed fixing because data was stored in the session it's a sign bigger things were wrong. RuntimeStorage is 100% the correct thing for the CLI - not the JoomlaStorage

avatar PhilETaylor
PhilETaylor - comment - 19 May 2021

RuntimeStorage is 100% the correct thing for the CLI - not the JoomlaStorage

Then this is not the PR to be complaining about - go hunt the place recently where someone changed the CLI storage.. .this PR just fixed their mess :)

avatar wilsonge
wilsonge - comment - 19 May 2021

This PR did change the CLI storage - you've changed it from Runtime to Joomla in this PR :)

avatar PhilETaylor
PhilETaylor - comment - 19 May 2021

Hmmmm....

Add a Comment

Login with GitHub to post a comment