? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
4 Sep 2018

Pull Request for Issue joomla-projects/privacy-framework#201.

Summary of Changes

This moves action log user notification option to separate table. It is a performance improvement on larger sites and shouldn't affect existing behavior. Except when going from 3.9-alpha as existing preference will be nullified in this case.

Testing Instructions

Download and install package https://github.com/SharkyKZ/joomla-cms/archive/comActionlogsPerf_1.zip or, if using Patchtester, apply Database Fix after installing patch.

Test that user settings in User Actions Log Options tab continue to be saved properly and that Send notifications for User Actions Log continues to be respected.

Also if someone could thoroughly review SQL file changes that would be great.

Comments on table structure welcome too.

Expected result

Actual result

Documentation Changes Required

Database changes, plugin field names changed.

avatar SharkyKZ SharkyKZ - open - 4 Sep 2018
avatar SharkyKZ SharkyKZ - change - 4 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Sep 2018
Category Administration SQL com_admin Postgresql MS SQL Installation Front End Plugins
avatar SharkyKZ SharkyKZ - change - 4 Sep 2018
The description was changed
avatar SharkyKZ SharkyKZ - edited - 4 Sep 2018
avatar SharkyKZ SharkyKZ - change - 4 Sep 2018
The description was changed
avatar SharkyKZ SharkyKZ - edited - 4 Sep 2018
avatar pjasmits
pjasmits - comment - 8 Sep 2018

patch is not working. After logout I get the following error:

0 syntax error, unexpected '')'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')'

avatar BurtNL
BurtNL - comment - 8 Sep 2018

I have tested this item ? unsuccessfully on 1ad00d8

Applied the patch, but unsuccessful. New table '#__action_logs_users' is not created and log out is not possible. On log out an error is shown.


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

avatar BurtNL BurtNL - test_item - 8 Sep 2018 - Tested unsuccessfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Sep 2018

@pjasmits please mark your Test as unsuccessfully:

  • open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as unsuccessfully
  • hit "submit test result"
avatar SharkyKZ SharkyKZ - change - 8 Sep 2018
Labels Added: ?
avatar SharkyKZ
SharkyKZ - comment - 8 Sep 2018

@pjasmits The error should be fixed now.

@BurtNL it's best to test by downloading the package (https://github.com/SharkyKZ/joomla-cms/archive/comActionlogsPerf_1.zip) and doing a fresh install. Alternatively, you can execute Database Fix to install missing tables. I'll update testing instructions.

avatar SharkyKZ SharkyKZ - change - 8 Sep 2018
The description was changed
avatar SharkyKZ SharkyKZ - edited - 8 Sep 2018
avatar pjasmits
pjasmits - comment - 8 Sep 2018

I have tested this item ? unsuccessfully on 2b561ee

patch gives error on logout


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

avatar pjasmits pjasmits - test_item - 8 Sep 2018 - Tested unsuccessfully
avatar BurtNL
BurtNL - comment - 8 Sep 2018

Thanks SharkyKZ, I used 'Fix database', which solved the log out problem. I will do some additional testing on this.


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

avatar BurtNL
BurtNL - comment - 8 Sep 2018

I have tested this item successfully on 2b561ee

Tested successfully on Joomla 3.9.0-alpha2-dev, on a fresh install, applied the patch, run the Fix Datase.
The new table has been created and contains content. Log out working proberly as well.
Patch works as intended by submitter, needs further testing.


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

avatar BurtNL BurtNL - test_item - 8 Sep 2018 - Tested successfully
avatar SharkyKZ SharkyKZ - change - 11 Sep 2018
Labels Added: ?
Removed: ?
avatar SharkyKZ
SharkyKZ - comment - 15 Sep 2018

Latest commits move other params to the table. @BurtNL @pjasmits could you re-test this with the latest changes?

avatar infograf768
infograf768 - comment - 18 Sep 2018

If this is merged, let's not forget to correct the absence of _LABEL for the constants in the xml concerned.

@mbabker When tested, do you intend to merge this proposal?

avatar ReLater
ReLater - comment - 18 Sep 2018

I have tested this item successfully on b66a904

Updated 2 or 3 days old nightly 3.9.
Applied patch and fixed database.
Saved all existing "Super Users" (!!!!). Have now rows in #__action_logs_users. Received or not emails according user settings.
Created new "Super Users" and some with other groups. Only "Super Users" see Acions Log tabulator after first saving. Other groups never see it.
Switched groups of users and deleted "Super Users". Rows in #__action_logs_users correctly deleted or created (after additional saving).
Don't receive emails anymore if "Send notifications" disabled or not "Super User" any longer.

Don't forget to remove and apply patch newly if you upgrade nightly 3.9 with "Upload&Update"!


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

avatar ReLater ReLater - test_item - 18 Sep 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Sep 2018

@BurtNL can you please retest?

avatar ReLater
ReLater - comment - 19 Sep 2018

@SharkyKZ
Please have a look on #22250 concerning possible conflicts. Solved

avatar BurtNL
BurtNL - comment - 19 Sep 2018

I have tested this item ? unsuccessfully on b66a904

Fresh install of Joomla_3.9.0-beta2-dev-Development-Full_Package, applied the patch, fixed the database.
Test with change options of User Actions Log failed.
When all 'Events to log' are not selected then all events will be selected again after 'Save'.
Changing individual events seems to work fine.

And when should the table '#action_logs_users' be filled?
What do I need to test to trigger the creation of records in that table?


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

avatar BurtNL
BurtNL - comment - 19 Sep 2018

I have tested this item ? unsuccessfully on b66a904

Fresh install of Joomla_3.9.0-beta2-dev-Development-Full_Package, applied the patch, fixed the database.
Test with change options of User Actions Log failed.
When all 'Events to log' are not selected then all events will be selected again after 'Save'.
Changing individual events seems to work fine.

And when should the table '#action_logs_users' be filled?
What do I need to test to trigger the creation of records in that table?


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

avatar BurtNL BurtNL - test_item - 19 Sep 2018 - Tested unsuccessfully
avatar Quy
Quy - comment - 19 Sep 2018

When all 'Events to log' are not selected then all events will be selected again after 'Save'.

This is the default behavior and not related to this PR. Unselecting all would defeat the purpose of logging.

And when should the table '#action_logs_users' be filled?

Edit your account and update User Actions Log Options.
Use phpMyAdmin and view `action_logs_users' table for your saved settings.

avatar ReLater
ReLater - comment - 19 Sep 2018

When all 'Events to log' are not selected then all events will be selected again after 'Save'.

I can't confirm your find.
19-09-_2018_23-10-50

19-09-_2018_23-02-17

And when should the table '#action_logs_users' be filled?

  • Whenever you save a "Super User" after the "User Actions Log Options" is shown.
  • When you change/add the group of an existing user to "Super User"
  • If you delete a "Super User" or remove the "Super User" group of an user the according row should be deleted.
avatar ReLater
ReLater - comment - 19 Sep 2018

This is the default behavior

I can't confirm your find.

Maybe we're using completely different Joomlas ? ;-) I've installed mine (nightly) some hours ago. And with the older version I also could save without any selected box.

avatar Quy
Quy - comment - 19 Sep 2018

When all 'Events to log' are not selected then all events will be selected again after 'Save'.

I stated incorrectly in my previous reply.

In PHP error log file, when no checkboxes selected:

PHP Notice:  Undefined index: actionlogsExtensions in \plugins\system\actionlogs\actionlogs.php on line 342
avatar SharkyKZ
SharkyKZ - comment - 20 Sep 2018

@BurtNL this can be reproduced without patch (try fresh 3.9.0 Beta 2) too. If you deselect all options on first save, no value is saved to database but form shows all options as selected (this is what the field defaults to). You would have to save again (with all or some options selected) to have the options stored.

Scenario # 2: select some options. Save. Deselect all options. Save again. The data still contains previously selected options. So, yes, you can't deselect all options.

Updating this so it works like without patch.

avatar SharkyKZ
SharkyKZ - comment - 20 Sep 2018

Alternatively, we could just add required attribute to the field...

avatar BurtNL
BurtNL - comment - 20 Sep 2018

@ReLater I'm using a new nightly build, but we are on different pages.
I'm on the Options page, you are on a user profile page.

screen shot 2018-09-20 at 09 32 25


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

avatar BurtNL
BurtNL - comment - 20 Sep 2018

@ReLater I'm using a new nightly build, but we are on different pages.
I'm on the Options page, you are on a user profile page.

screen shot 2018-09-20 at 09 32 25


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

avatar BurtNL
BurtNL - comment - 20 Sep 2018

@SharkyKZ Yes, you are right, I'm sorry about that.
I just run a test again and with or without the patch the behaviour is the same, so not related to the patch.

I agree with you to add the required attribute, because now the behaviour is a bit odd, to my opinion.
Later today I will have a look at the other test instructions about how to get some entries into one of the tables.

Wouldn't it be nice to have the 'Yes/No' switches instead of the select boxes in the Option page?
Like on the other pages in the admin interface.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21983.
avatar BurtNL
BurtNL - comment - 20 Sep 2018

@SharkyKZ Yes, you are right, I'm sorry about that.
I just run a test again and with or without the patch the behaviour is the same, so not related to the patch.

I agree with you to add the required attribute, because now the behaviour is a bit odd, to my opinion.
Later today I will have a look at the other test instructions about how to get some entries into one of the tables.

Wouldn't it be nice to have the 'Yes/No' switches instead of the select boxes in the Option page?
Like on the other pages in the admin interface.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21983.
avatar SharkyKZ
SharkyKZ - comment - 20 Sep 2018

@BurtNL I see what you mean now. This PR is for user settings added by System - User Action Logs plugin, not for settings in User Action Logs component. To test you need to edit a user profile.

avatar SharkyKZ
SharkyKZ - comment - 9 Oct 2018

@BurtNL @ReLater @pjasmits can you re-test this please?

avatar BurtNL
BurtNL - comment - 10 Oct 2018

I have tested this item successfully on bb11b72

Did a fresh install of Joomla_3.9.0-rc2-dev, applied the patch, fixed the database and tested the User Actions Log Options.
Looks good!


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

avatar BurtNL BurtNL - test_item - 10 Oct 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 17 Oct 2018

I have tested this item successfully on bb11b72

This has solved #22662


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

avatar infograf768 infograf768 - test_item - 17 Oct 2018 - Tested successfully
avatar infograf768 infograf768 - change - 17 Oct 2018
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 17 Oct 2018

RTC

@mbabker
Please merge as this corrects important bugs.


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

avatar mbabker mbabker - close - 17 Oct 2018
avatar mbabker mbabker - merge - 17 Oct 2018
avatar mbabker mbabker - change - 17 Oct 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-10-17 12:00:41
Closed_By mbabker
Labels Added: ?

Add a Comment

Login with GitHub to post a comment