? Pending

User tests: Successful: Unsuccessful:

avatar JoomliC
JoomliC
16 Oct 2018

EDIT

new PR here: #22699

Pull Request for Issue #22627.

Summary of Changes

  • Remove default attribute for loggable_extensions (Fix #22627 UX issue)
  • Add a "Select All/None" for loggable extensions to help selecting all or clearing all on one click.

capture d ecran 2018-10-16 a 21 20 40

Testing Instructions

  • See issue #22627
  • Test actions logging options, all selected, some selected, none selected.
avatar JoomliC JoomliC - open - 16 Oct 2018
avatar JoomliC JoomliC - change - 16 Oct 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Oct 2018
Category Administration
avatar JoomliC JoomliC - change - 16 Oct 2018
Labels Added: ?
avatar Quy
Quy - comment - 17 Oct 2018

It is still an issue when editing a profile.

Edit a Super User profile
Go to User Actions Log Options
Select None
Click Save

All checkboxes are checked.

avatar JoomliC
JoomliC - comment - 18 Oct 2018

@Quy Oh! I didn't even see there was this field in super user edit...

To be honnest, i don't see yet how the core extensions are set by default, as no default attribute in plugin system actionlogs form...

avatar JoomliC
JoomliC - comment - 18 Oct 2018

@Quy Did you test super user with latest staging including #21983 ?

avatar Quy
Quy - comment - 18 Oct 2018

Yes tested with latest staging including #21983.

avatar SharkyKZ
SharkyKZ - comment - 18 Oct 2018

The plugin will need to be adjusted. But the field also needs to remove checked attribute from its options.

Test case:
Save com_actionlogs configuration with some or all events selected.
Deselect all events and save again.
No events are saved but all events appear checked.

avatar JoomliC
JoomliC - comment - 18 Oct 2018

Thanks @SharkyKZ
Do you have tested this PR ?

Test case:
Save com_actionlogs configuration with some or all events selected.
Deselect all events and save again.
No events are saved but all events appear checked.

With this PR, it works for me with com_actionlogs configuration as i've removed there the default attribute from config.xml.
But in plugin system actionlogs, no default attribute for user edit form actionlogs.xml
So it should act as for global options as same form field used.

The issue is with this PR not really the same as it was before.

Maybe in menu/plugin, the issue is the save function does not allow empty submitted data, and then replace by previously saved data.

@SharkyKZ your help could be appreciated to know if a change in form data processed to be done in the plugin, or if another issue elsewhere...

avatar JoomliC
JoomliC - comment - 18 Oct 2018

@SharkyKZ I've found why this PR does not have effect on super user edit!

In plugin, it is forced to save only if isset. But if empty, it won't update extensions column, and so keep previous setting.

Fix
Adding the following else statement for this if statement here: https://github.com/joomla/joomla-cms/pull/21983/files#diff-bbf838ec8885d4ea43274f7b94e17808R343:

else
{
	$values[] = $this->db->quoteName('extensions') . ' = ""';
}

Would fix issue.

Note: i can add this change to this PR if you think it's ok with this ?

avatar SharkyKZ
SharkyKZ - comment - 18 Oct 2018

#21983 was written to maintain the existing behavior of form fields. See #21983 (comment).

Your fix seems OK. But maybe we should store empty JSON array ([]) instead of an empty string. IDK about this.

Also the field itself needs updating to remove checked attribute by default. Otherwise, after deselecting all options and saving they appear checked again, even when default value is not set. See this part

avatar mbabker
mbabker - comment - 18 Oct 2018

Your fix seems OK. But maybe we should store empty JSON array ([]) instead of an empty string. IDK about this.

If a column or data source is expecting a JSON string, then it should always be stored as something that doesn't cause json_decode() to set an error flag. We've got too many places in core where this is being hacked around already.

avatar joomla-cms-bot joomla-cms-bot - change - 18 Oct 2018
Category Administration Administration Front End Plugins
avatar JoomliC
JoomliC - comment - 18 Oct 2018

Will redo this PR with changes needed (i did something wrong with udpating this one, and better to get things clear) ;-)

avatar JoomliC JoomliC - change - 18 Oct 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-10-18 14:16:48
Closed_By JoomliC
avatar JoomliC JoomliC - close - 18 Oct 2018
avatar JoomliC
JoomliC - comment - 18 Oct 2018

PR redo here: #22699
Thanks for comments and help here! ?

avatar JoomliC JoomliC - change - 18 Oct 2018
The description was changed
avatar JoomliC JoomliC - edited - 18 Oct 2018
avatar JoomliC JoomliC - change - 18 Oct 2018
Title
[ActionsLog] Improve UX for loggable extensions checkboxes with a select all/none REDO #22669
[ActionsLog] Improve UX for loggable extensions checkboxes with a select all/none SEE #22699
avatar JoomliC JoomliC - edited - 18 Oct 2018

Add a Comment

Login with GitHub to post a comment