? ? ? Failure

User tests: Successful: Unsuccessful:

avatar izharaazmi
izharaazmi
31 Jan 2017

Summary of Changes

Removed bulk actions from protected menu items. Kept the list intact in readonly state, we may decide to remove it if that sounds better.

Updated MenusHelper and JHtmlMenus to respect client_id wherever applicable.

Menu item of type container now allows users to select items from the menutype main which they want to hide from their custom admin menu. Any new extension installed afterwards will be displayed until explicitly marked to be hidden.

The bug is fixed which caused container to show up (though empty) even when there were no child items to it. This can be useful to hide the container itself by hiding all its items. It will automatically appear back when a new component is installed.

Testing Instructions

  • Create a menutype 'menu', you should be able to create it without any warning after this patch. Without this patch a warning will be shown saying it is a reserved name.

  • Menu manager menutype dropdown filter should no longer shown the options Menu (protected) and Main (protected).

  • Edit/Publish/Unpublish/Delete/Trash/Batch toolbar buttons should not be displayed in menu manager when filtered by the protected menutype 'main'.

  • Create a new custom admin menu and add a new menu item of type System Links > Components Menu Container. You should be able to choose menu items to hide.

  • The above selected menu items should not show under this container menu item when using your custom admin menu.

  • Hide everything in the container, the container should itself be hidden as well.

  • Install a new extension. The new extension should show up in the container.

  • The issues #13787 and #13788 were already fixed. Make sure this patch does not break it again.

Documentation Changes Required

None

Pinging @infograf768

avatar izharaazmi izharaazmi - open - 31 Jan 2017
avatar infograf768
infograf768 - comment - 31 Jan 2017

Are there some params somewhere that I have to delete to test this on an updated staging?

avatar infograf768
infograf768 - comment - 31 Jan 2017

Forget it, I have the same results on a clean install.

Results of first round of tests for the Components Container:

The checkboxes are inverted: checked should usually Show instead of Hide.
There is no Tip showing when displaying Menu Selection which makes it confusing.
I think it should in fact not be a bubble tip but a permanent Notice.

For Menu Items Manager:
The checkboxes and other columns like status, etc, are displayed when filtering by Main (Protected) 'menutype'.
No permanent tip/text to explain what is that 'menutype'

Language strings.
Some lang strings values look obsolete and should be updated:
Example: COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_DESC="Choose whether this should be a container for the components menu created during installation of new components.<br><br>To hide any or all of those menu items from this container you can just unpublish them under the menu type: <strong>Main</strong> (protected)."

Others don't look like they are used
COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_HIDE_ITEMS_LABEL="Items to Hide"

avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

The checkboxes are inverted: checked should usually Show instead of Hide.

We discussed this here #13739 (comment) and those follow it.

There is no Tip showing when displaying Menu Selection which makes it confusing.

Sorry, I forgot to put the label right. Fixed.

Removed the Protect Menu filter choice from the manager. No need to bother much about what user can't do anything with. Is that acceptable?

avatar joomla-cms-bot joomla-cms-bot - change - 1 Feb 2017
Category Administration com_menus Language & Strings Modules Libraries Unit Tests
avatar infograf768
infograf768 - comment - 1 Feb 2017

The checkboxes are inverted: checked should usually Show instead of Hide.

We discussed this here #13739 (comment) and those follow it.

I understand what you say but I still think that we should consider positive actions and not negative actions. I.e. by default all menu items to display should have the checkbox ticked as used elsewhere in core (assignments).

For the rest, looks fine here, including new components installed, assignments, display or not of the Component Container heading if all are set to hide.

@rdeutz @Bakual @wilsonge @laoneo
What do you think?
This is imho the last thing to decide for this feature before beta1

avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

But NOT the last thing, we need to handle the component update issue too.
As of now, I am working on that.

avatar infograf768
infograf768 - comment - 1 Feb 2017

But NOT the last thing

Right. ?

avatar infograf768
infograf768 - comment - 1 Feb 2017

And maybe too forcing the creation of a Components Container to reply to nikosdion concerns in #13739

avatar laoneo
laoneo - comment - 1 Feb 2017

I don't know if this should be part of this PR as I got lost somewhere. But it is not possible anymore to edit the default menu (I guess you guys call it admin) like unpublishing components?

avatar infograf768
infograf768 - comment - 1 Feb 2017

@laoneo

  1. Create an admin menu and its module. Publish that module in Menu position.
  2. Create menu items for this admin menu
    It should include a menu item to Modules Manager and one to Menu items Manager
  3. Create a Components Menu Container (It is available in the modal under System links).
    It is there that you can choose which Components menu items will be displayed or not.
    screen shot 2017-02-01 at 09 08 27
    screen shot 2017-02-01 at 09 08 56
avatar laoneo
laoneo - comment - 1 Feb 2017

I'v checked all your test instructions and they are all fine. I'v tested it with the Free version of DPCalendar and it appears automatically in the Components Menu Container.

Edit/Publish/Unpublish/Delete/Trash/Batch toolbar buttons should not be displayed in menu manager when filtered by the protected menutype 'main'.

This is not possible anymore because the menu is not shown at all, or? Should we test it for some stuff which can break?

avatar izharaazmi izharaazmi - edited - 1 Feb 2017
avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

@laoneo Test instructions updated.

avatar infograf768
infograf768 - comment - 1 Feb 2017

@laoneo
What we have to decide is #13830 (comment)
What do you think?

avatar laoneo
laoneo - comment - 1 Feb 2017

As I first opened this menu item. I expected it to select the components to show and not to hide.

avatar infograf768
infograf768 - comment - 1 Feb 2017

As I first opened this menu item. I expected it to select the components to show and not to hide.

yep, that is also what I thought, thus my suggestion.
Let's wait other comments before asking @izharaazmi to change.

avatar laoneo
laoneo - comment - 1 Feb 2017

Gold solution would be to have it similar to the module manager.

avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

I understand, and I too like it the other way around. But we have a
situation here. If we a list of items to "show" instead of "hide" then
after installation of a new component 'com_foo' we won't have 'com_foo' in
our list. This will cause 'com_foo' not being shown – as we only show the
already selected items and 'com_foo' wasn't selected. More confusion to the
users.

Any better solution is welcome, so far I do not have one. Thinking!

avatar izharaazmi izharaazmi - change - 1 Feb 2017
The description was changed
Labels Added: ? ? ?
avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

@infograf768 @laoneo Please see if it is now any better.

avatar infograf768
infograf768 - comment - 1 Feb 2017

Looks good. ?
Maybe modify the label and desc values:
from

COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_HIDE_ITEMS_DESC="Select the menu items that should <strong>not be shown</strong> under this container. If there are no items to show, then this container will also be hidden.<br>Please note that when you install a new component it will be displayed by default until you come back here and select it too."
COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_HIDE_ITEMS_LABEL="Choose Items to Hide"

to something like

COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_HIDE_ITEMS_DESC="Select the menu items that should <strong>be shown or not</strong> under this container. If there are no items to show, then this container will also be hidden.<br>Please note that when you install a new component it will be displayed by default until you come back here and hide it too."
COM_MENUS_ITEM_FIELD_COMPONENTS_CONTAINER_HIDE_ITEMS_LABEL="Show or Hide Menu Items"

screen shot 2017-02-01 at 16 25 48

What do you think?

avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

I did that and forgot to push it :D

avatar izharaazmi
izharaazmi - comment - 1 Feb 2017

@infograf768 Please check now.

avatar infograf768
infograf768 - comment - 1 Feb 2017

Can't see Test button on issue.joomla.org.

Tested successfully here.

avatar infograf768 infograf768 - change - 2 Feb 2017
Status New Pending
avatar infograf768
infograf768 - comment - 2 Feb 2017

@mbabker

Can you solve the Test button issue?


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

@infograf768 Can see Test button. Had this one time, after re-login solved.

avatar infograf768
infograf768 - comment - 2 Feb 2017

@franz-wohlkoenig

Does not work for me.

BTW, can you test this PR as well as https://issues.joomla.org/tracker/joomla-cms/13838 while keeping this patch.


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

Create a menutype 'menu', you should be able to create it without any warning after this patch. Without this patch a warning will be shown saying it is a reserved name.

works

> Menu manager menutype dropdown filter should no longer shown the options Menu (protected) and Main (protected).

what should "Menu manager menutype dropdown filter" show? I don't know which dropdown filter is meant.

Create a new custom admin menu and add a new menu item of type System Links > Components Menu Container.

1. Custom Menu is build:

1

2. Click on "Admin Custom" open:

2

3. "New" > "Menu Item Type" open

3
instead of
4
which i get by "Menus" > "Admin Custom" > "Add new Menu Item"

avatar infograf768
infograf768 - comment - 2 Feb 2017

Where does this Admin-fw come from?

avatar infograf768
infograf768 - comment - 2 Feb 2017

adminmenus2

avatar infograf768
infograf768 - comment - 2 Feb 2017

@izharaazmi
While making the glip for @franz-wohlkoenig I found a weird issue with Components Container. It could come from some settings here. Better to check though.
By default it displays here "modules" and "menu items"

screen shot 2017-02-02 at 10 51 49

It comes from the fact that I already created some menu items for these:

screen shot 2017-02-02 at 10 56 21

If I unpublish these, then they are not displayed anymore in the Components Container.

avatar izharaazmi
izharaazmi - comment - 2 Feb 2017

Can you please verify if no such menu items actually exists in your db by
going
here /administrator/index.php?option=com_menus&view=items&menutype=main or
in the database directly!

avatar infograf768
infograf768 - comment - 2 Feb 2017

@izharaazmi
I found where the issue came from:
I had used the type "menu" for my customadmin menu
screen shot 2017-02-02 at 11 07 42

Once changed, all is fine.

I guess we still should prevent using "menu" as type...

avatar izharaazmi
izharaazmi - comment - 2 Feb 2017

Oh great. I had missed that at one place. It should now work fine. Please
go back and change it to 'menu' again and see if its correct now.

avatar infograf768
infograf768 - comment - 2 Feb 2017

@izharaazmi
It will work if you correct the extraneous ( ?
It should not be:
->where('(m.menutype = ' . $db->q('main'))
but
->where('m.menutype = ' . $db->q('main'))
Once done, I will mark the test OK

avatar izharaazmi
izharaazmi - comment - 2 Feb 2017

So sorry! My bad!

avatar infograf768
infograf768 - comment - 2 Feb 2017

OK now. Still can't get the Test button on issue.joomla.org

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

@infograf768 Admin-fw is the name of my custom admin-menu. Below a gif:
custom-menu

avatar infograf768
infograf768 - comment - 2 Feb 2017

@franz-wohlkoenig
I suggest you test again on a clean staging. See above.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

@infograf768 yes, staging installed today morning. Changes by @izharaazmi are not applied by Patchtester?

avatar izharaazmi
izharaazmi - comment - 2 Feb 2017

@franz-wohlkoenig Please note that your screenshot has only one dropdown (the menutype one) before search box. The client dropdown is missing. That is not correct.

See 1st image in #13830 (comment)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

@izharaazmi have seen and made new install, latest staging, Patchtester update: Same Result and no "Access" in Menu Items:
1

avatar izharaazmi
izharaazmi - comment - 2 Feb 2017

Do you have these files in your installation?

administrator/components/com_menus/layouts/joomla/searchtools/default/bar.php
administrator/components/com_menus/layouts/joomla/searchtools/default.php

avatar infograf768
infograf768 - comment - 2 Feb 2017

I have tested this item successfully on 982aaf6

wow... test works again


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

avatar infograf768 infograf768 - test_item - 2 Feb 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

I'm testing on a live-Site and learned now, that "upload & update" latest staging install in an Folder as i thought it will update Installation.
So i will make daily a clean installation by latest staging.
Sorry for Confusing.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

@izharaazmi there are no "Access-Levels"
screen shot 2017-02-02 at 5 11 46 pm

avatar infograf768
infograf768 - comment - 2 Feb 2017

@franz-wohlkoenig
we do not need access levels for these, only for the module displaying them

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Feb 2017

I have tested this item successfully on 982aaf6


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 2 Feb 2017 - Tested successfully
avatar rdeutz rdeutz - change - 2 Feb 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-02 16:42:11
Closed_By rdeutz
avatar rdeutz rdeutz - close - 2 Feb 2017
avatar rdeutz rdeutz - merge - 2 Feb 2017
avatar rdeutz
rdeutz - comment - 2 Feb 2017

Great, so now #13857 and I can make the beta1 release :-)

avatar infograf768
infograf768 - comment - 2 Feb 2017

we also need #13838

Add a Comment

Login with GitHub to post a comment