? Pending

User tests: Successful: Unsuccessful:

avatar alexandraciobica
alexandraciobica
9 Mar 2018

Pull Request for Issue #19827.

Summary of Changes

In this PR #18195 this bug #15134 was fixed that is hiding the proceed button from the items with Trashed status. However, the fix affected all the statuses from the admin menus.

The old condition:
<?php if ((strlen($menuType) && $menuType != '*' && $clientId == 0) || ($published > 0 && $clientId == 1)): ?>

$published can be:

  • "" when no status is selected
  • 0 when Unpublished status is selected
  • 1 when Published status is selected
  • -2 when Trashed status is selected

New condition, taking care of the items with Trashed state selected
<?php if (strlen($menuType) && $menuType != '*' && $published != -2): ?>

Testing Instructions

  1. Create an admin menu
  2. Create some menu items in this admin menu
  3. Select some menu items and click toolbar button batch

Result

Hide proceed button when selected items state is Trashed, show it otherwise.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar alexandraciobica alexandraciobica - open - 9 Mar 2018
avatar alexandraciobica alexandraciobica - change - 9 Mar 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Mar 2018
Category Administration com_menus
avatar astridx
astridx - comment - 9 Mar 2018

I have tested this item successfully on 0e2851d


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

avatar astridx astridx - test_item - 9 Mar 2018 - Tested successfully
avatar Anu1601CS
Anu1601CS - comment - 10 Mar 2018

I have tested this item successfully on 0e2851d


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

avatar Anu1601CS Anu1601CS - test_item - 10 Mar 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 10 Mar 2018

@izharaazmi
Is this PR OK for you?

avatar izharaazmi
izharaazmi - comment - 10 Mar 2018

Looking at the current code (without this PR) it appears that it is still showing the process button for trash for frontend menus, not solving the real issue in #18195. Please verify.

This PR looks good to me, except the extra pair of parenthesis inside if ;-)

avatar alexandraciobica alexandraciobica - change - 10 Mar 2018
Labels Added: ?
avatar alexandraciobica
alexandraciobica - comment - 10 Mar 2018

I fixed this bug, but as it was related to the other bug for the items with Trashed status, I observed that:

  • when selecting published status ‘All’
  • if you select a trashed item
  • and then batch, the process button is not hidden. Should this be fixed? Or the functionality was only for selecting the Trashed status?

I believe that with the current implementation, there is no way of doing this in the backend, but I could write a JS script that at least hides the button in this case.

PS: Removed extra parenthesis :D

avatar izharaazmi
izharaazmi - comment - 10 Mar 2018

IMHO, nothing should stop us to batch process the trashed items. However, I haven't looked closely so I can't tell for sure.

If this is really the special case with trashed items, then we should have:

if (strlen($menuType) && $menuType != '*' && strlen($published) && $published != '*' && $published != -2)
avatar alexandraciobica
alexandraciobica - comment - 10 Mar 2018

@izharaazmi, in your solution the proceed button is displayed only in the case when the selected state is 'Published' or 'Unpublished' but it is not shown when selected 'All', which affects the published and unpublished items together with the trashed ones. Indeed I don't know why trashed items shouldn't be batched, I've just followed what the other bug(#15134) said.

avatar alexandraciobica alexandraciobica - change - 12 Mar 2018
The description was changed
avatar alexandraciobica alexandraciobica - edited - 12 Mar 2018
avatar Samgithub1997
Samgithub1997 - comment - 25 Mar 2018

I have tested this item successfully on a569ca0


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

avatar Samgithub1997 Samgithub1997 - test_item - 25 Mar 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 13 Sep 2018

I think this solution is fine. Should be ported to staging.
See #22154

avatar infograf768
infograf768 - comment - 14 Sep 2018

As we have a similar issue in 3.9/staging, I am closing this in favor of #22178 which shall be ported to 4.0 by the usual process.

avatar infograf768 infograf768 - change - 14 Sep 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-09-14 07:09:08
Closed_By infograf768
avatar infograf768 infograf768 - close - 14 Sep 2018

Add a Comment

Login with GitHub to post a comment