? Failure

User tests: Successful: Unsuccessful:

avatar chmst
chmst
8 Mar 2019

Most users do not understand what the refresh button in categories does.
Just now got an issue in a german user group, where a user tried to publish his trashed categories via the button "rebuild".

Summary of Changes

If filter.trashed is on, the refresh button is hidden

Note: I would like to remove the "new" button in trashed lists too - who wants to write fot the trash?

Testing Instructions

Trash one or more categories
Inspect the view categories before (button is visible) and after patch (button rebuild ist ont visible).

Documentation Changes Required

avatar chmst chmst - open - 8 Mar 2019
avatar chmst chmst - change - 8 Mar 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Mar 2019
Category Administration com_categories
avatar brianteeman
brianteeman - comment - 8 Mar 2019

Does rebuild work as intended when the filter is trashed. If it does then imho this was simply user error

avatar chmst
chmst - comment - 8 Mar 2019

I think it works also in the trashed view and it is a user error. But why not remove it here and don't make users think (wrong)?

avatar brianteeman
brianteeman - comment - 8 Mar 2019

If the user thought that rebuild would magically move there trashed categories back to being published I think that same user would think the rebuild button would do that wherever it is.

We cant fix stupid - my 2c

avatar astridx astridx - test_item - 10 Mar 2019 - Tested successfully
avatar astridx
astridx - comment - 10 Mar 2019

I have tested this item successfully on 843af9b


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

avatar astridx astridx - test_item - 10 Mar 2019 - Tested successfully
avatar astridx
astridx - comment - 10 Mar 2019

When I tested this pr yesterday I also thought that hiding the button is not correct. After a night's sleep I think differently.

We cant fix stupid, but we can make it easier for people.

Emty Trash work as intended when the filter is not trashed, but we only show it when the filter is trashed. I think we do that because we want to show the user only the features that are important to him for the moment.
Someone who wants to rebuild articles and categories will not open the trash view. Therefore, it makes sense in my opinion to hide the button here.

avatar chmst chmst - change - 10 Mar 2019
Labels Added: ?
avatar brianteeman
brianteeman - comment - 13 Mar 2019

@chmst Its probably a translation issue but could you update the title and description of this issue to use "rebuild" and not "refresh" please

avatar chmst chmst - change - 13 Mar 2019
Title
[4.0] No refresh button for categories in filter "trashed"
[4.0] No rebuild button for categories in filter "trashed"
avatar chmst chmst - change - 13 Mar 2019
Title
[4.0] No refresh button for categories in filter "trashed"
[4.0] No rebuild button for categories in filter "trashed"
avatar chmst chmst - edited - 13 Mar 2019
avatar chmst
chmst - comment - 13 Mar 2019

@brianteeman you are right, in the code, it is a "refresh" button.

avatar brianteeman
brianteeman - comment - 13 Mar 2019

Thank you @chmst

avatar mbabker
mbabker - comment - 13 Mar 2019

Emty Trash work as intended when the filter is not trashed, but we only show it when the filter is trashed. I think we do that because we want to show the user only the features that are important to him for the moment.

It has nothing to do with "features that are important at the moment". Rather, it is designed as a safeguard to ensure the user actually reviews what is in the trashed state (think of it as your operating system's Trash or Recycle Bin) before permanently deleting something. There are no other system limitations on using the empty trash button, but without that existing check it is too easy for a user to do something that causes permanent change on their site (executing DELETE queries on their database). Hiding action buttons in general simply because "why should a user do this while the trashed filter is active" IMO makes little sense.

avatar chmst
chmst - comment - 13 Mar 2019

My opinion is: Of course it does not make much harm if the button is there or not.

But every little helps to make a system easier - every single button which needs NOT to be read and NOT to be tabbed. I am rather sure that no user and no developer will miss the button at this place or has ever used it - except if he thinks that this could reactivate the trashed Elements.

avatar mbabker
mbabker - comment - 13 Mar 2019

By that argument you could also say the only buttons that should be on the toolbar when in a trashed filter is the empty trash and publish buttons because "it makes no sense for a user to be able to create a new item or edit something that has been deleted". Or if you wanted to be correct about things, the rebuild button should only be visible when all items are viewed because it acts on everything regardless of state.

I don't necessarily agree with arbitrarily creating this type of restriction on actions you can do based on the active state filter. If there are going to be restrictions, they need to be in the user's best interest (as is the case with the empty trash button now because it deliberately requires an extra step before permanently deleting content), otherwise saying "you must have this state active to perform this action" creates the potential for unnecessary confusion. The better option, that has continually been shot down over the years, is a context relevant toolbar akin to Gmail, but since that has continually been shot down that's never going to be an option.

avatar Bodge-IT
Bodge-IT - comment - 13 Mar 2019

I have tested this item ? unsuccessfully on 9b53249

Deleted categories and set filter to trashed. (Rebuild is there)
Apply patch. Clear cache.
Rebuild button disappears. Reappears when I set filter to trashed.
This might be reason: !$this->state->get('filter.published') != -2)


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

avatar Bodge-IT
Bodge-IT - comment - 13 Mar 2019

I have tested this item ? unsuccessfully on 9b53249

Deleted categories and set filter to trashed. (Rebuild is there)
Apply patch. Clear cache.
Rebuild button disappears. Reappears when I set filter to trashed.
This might be reason: !$this->state->get('filter.published') != -2)


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

avatar Bodge-IT Bodge-IT - test_item - 13 Mar 2019 - Tested unsuccessfully
avatar flyingwombats
flyingwombats - comment - 13 Mar 2019

I have tested this item ? unsuccessfully on 9b53249

This is working the wrong way round. So that when you do the patch and clear cache the rebuild disappears in all cases apart from when in trash

In the code you have a double negative
if ($canDo->get('core.admin') && !$this->state->get('filter.published') != -2)
So if first case is true and not filter is not equal to trashed
Should be either
if ($canDo->get('core.admin') && $this->state->get('filter.published') != -2)
or
if ($canDo->get('core.admin') && !$this->state->get('filter.published') == -2)


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

avatar flyingwombats flyingwombats - test_item - 13 Mar 2019 - Tested unsuccessfully
avatar chmst chmst - change - 5 Oct 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-10-05 08:58:12
Closed_By chmst
avatar chmst chmst - close - 5 Oct 2019

Add a Comment

Login with GitHub to post a comment